mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-12-02 22:18:09 +01:00
linux (compat): Add linux to most Win64 guards
This commit is contained in:
1 parent
8cf5675892
commit
9626065598
180 files changed
+941
-935
No files matched your search
@@ -6,7 +6,7 @@
|
||||
#include "Tesselator.h"
|
||||
#include "Textures.h"
|
||||
#include "../Minecraft.World/SoundTypes.h"
|
||||
#ifdef _WINDOWS64
|
||||
#if defined(_WINDOWS64) || defined(__linux__)
|
||||
#include "Windows64/KeyboardMouseInput.h"
|
||||
#endif
|
||||
|
||||
@@ -55,7 +55,7 @@ void Screen::keyPressed(wchar_t eventCharacter, int eventKey)
|
||||
|
||||
wstring Screen::getClipboard()
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
#if defined(_WINDOWS64) || defined(__linux__)
|
||||
if (!OpenClipboard(nullptr)) return wstring();
|
||||
HANDLE h = GetClipboardData(CF_UNICODETEXT);
|
||||
wstring out;
|
||||
@@ -73,7 +73,7 @@ wstring Screen::getClipboard()
|
||||
|
||||
void Screen::setClipboard(const wstring& str)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
#if defined(_WINDOWS64) || defined(__linux__)
|
||||
if (!OpenClipboard(nullptr)) return;
|
||||
EmptyClipboard();
|
||||
size_t len = (str.length() + 1) * sizeof(wchar_t);
|
||||
@@ -135,7 +135,7 @@ void Screen::init()
|
||||
|
||||
void Screen::updateEvents()
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
#if defined(_WINDOWS64) || defined(__linux__)
|
||||
// Poll mouse button state and dispatch click/release events
|
||||
for (int btn = 0; btn < 3; btn++)
|
||||
{
|
||||
@@ -251,7 +251,7 @@ void Screen::updateEvents()
|
||||
|
||||
void Screen::mouseEvent()
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
#if defined(_WINDOWS64) || defined(__linux__)
|
||||
// Mouse event dispatching is handled directly in updateEvents() for Windows
|
||||
#else
|
||||
/* 4J - TODO
|
||||
|
||||
Reference in new issue
Block a user