diff options
author | Adrian Graber <adrian@adriangraber.com> | 2021-07-04 18:52:48 +0200 |
---|---|---|
committer | Adrian Graber <adrian@adriangraber.com> | 2021-07-13 00:49:13 +0200 |
commit | 28f266302fbeea2d75d5a62de651d464ab380798 (patch) | |
tree | e9ae6bc810489c798e6bb3f27d75afe803c7f9ae /src/skel/glfw/glfw.cpp | |
parent | Vanilla config for Windows and win-x86 only (diff) | |
download | re3-28f266302fbeea2d75d5a62de651d464ab380798.tar re3-28f266302fbeea2d75d5a62de651d464ab380798.tar.gz re3-28f266302fbeea2d75d5a62de651d464ab380798.tar.bz2 re3-28f266302fbeea2d75d5a62de651d464ab380798.tar.lz re3-28f266302fbeea2d75d5a62de651d464ab380798.tar.xz re3-28f266302fbeea2d75d5a62de651d464ab380798.tar.zst re3-28f266302fbeea2d75d5a62de651d464ab380798.zip |
Diffstat (limited to '')
-rw-r--r-- | src/skel/glfw/glfw.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index 8d3fc7d7..c7f92d34 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -12,12 +12,14 @@ DWORD _dwOperatingSystemVersion; #include "resource.h" #else long _dwOperatingSystemVersion; +#ifndef GTA_SWITCH #ifndef __APPLE__ #include <sys/sysinfo.h> #else #include <mach/mach_host.h> #include <sys/sysctl.h> #endif +#endif #include <errno.h> #include <locale.h> #include <signal.h> @@ -51,7 +53,7 @@ long _dwOperatingSystemVersion; #include "MemoryMgr.h" // We found out that GLFW's keyboard input handling is still pretty delayed/not stable, so now we fetch input from X11 directly on Linux. -#if !defined _WIN32 && !defined __APPLE__ && !defined __SWITCH__ // && !defined WAYLAND +#if !defined _WIN32 && !defined __APPLE__ && !defined GTA_SWITCH // && !defined WAYLAND #define GET_KEYBOARD_INPUT_FROM_X11 #endif @@ -485,12 +487,14 @@ psInitialize(void) debug("Physical memory size %llu\n", _dwMemAvailPhys); debug("Available physical memory %llu\n", size); #else +#ifndef GTA_SWITCH struct sysinfo systemInfo; sysinfo(&systemInfo); _dwMemAvailPhys = systemInfo.freeram; debug("Physical memory size %u\n", systemInfo.totalram); debug("Available physical memory %u\n", systemInfo.freeram); #endif +#endif TheText.Unload(); @@ -949,13 +953,15 @@ void psPostRWinit(void) RwVideoMode vm; RwEngineGetVideoModeInfo(&vm, GcurSelVM); + glfwSetFramebufferSizeCallback(PSGLOBAL(window), resizeCB); +#ifndef IGNORE_MOUSE_KEYBOARD #ifndef GET_KEYBOARD_INPUT_FROM_X11 glfwSetKeyCallback(PSGLOBAL(window), keypressCB); #endif - glfwSetFramebufferSizeCallback(PSGLOBAL(window), resizeCB); glfwSetScrollCallback(PSGLOBAL(window), scrollCB); glfwSetCursorPosCallback(PSGLOBAL(window), cursorCB); glfwSetCursorEnterCallback(PSGLOBAL(window), cursorEnterCB); +#endif glfwSetWindowIconifyCallback(PSGLOBAL(window), windowIconifyCB); glfwSetWindowFocusCallback(PSGLOBAL(window), windowFocusCB); glfwSetJoystickCallback(joysChangeCB); @@ -1791,7 +1797,7 @@ main(int argc, char *argv[]) InitMemoryMgr(); #endif -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(GTA_SWITCH) struct sigaction act; act.sa_sigaction = terminateHandler; act.sa_flags = SA_SIGINFO; |