mirror of
https://github.com/sarah-walker-pcem/pcem.git
synced 2025-07-23 03:33:02 +02:00
Added X11 Force Mode as a option that can be turned on and off. See #128 for details.
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"version": "0.2.1",
|
||||
"defaults": {},
|
||||
"configurations": [
|
||||
{
|
||||
"project": "CMakeLists.txt",
|
||||
"projectTarget": "pcem.exe (src\\pcem.exe)",
|
||||
"name": "PCem 64-bit Debugger",
|
||||
"type": "cppdbg",
|
||||
"miDebuggerPath": "C:\\msys64\\mingw64\\bin\\gdb.exe",
|
||||
"inheritEnvironments": [
|
||||
"mingw_64"
|
||||
],
|
||||
"MIMode": "gdb",
|
||||
"program": "${debugInfo.target}",
|
||||
"externalConsole": true
|
||||
},
|
||||
{
|
||||
"project": "CMakeLists.txt",
|
||||
"projectTarget": "pcem.exe (src\\pcem.exe)",
|
||||
"name": "PCem 32-bit Debugger",
|
||||
"type": "cppdbg",
|
||||
"miDebuggerPath": "C:\\msys64\\mingw32\\bin\\gdb.exe",
|
||||
"inheritEnvironments": [
|
||||
"mingw_i686"
|
||||
],
|
||||
"MIMode": "gdb",
|
||||
"program": "${debugInfo.target}",
|
||||
"externalConsole": true
|
||||
}
|
||||
]
|
||||
}
|
@@ -46,6 +46,8 @@ endif()
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
option(USE_ALSA "Build PCem with MIDI output using ALSA" OFF)
|
||||
message("ALSA MIDI Support: ${USE_ALSA}")
|
||||
option(FORCE_X11 "Force X11 Mode on Wayland Systems" ON)
|
||||
message("Force X11 Mode on Wayland Systems: ${FORCE_X11}")
|
||||
endif()
|
||||
|
||||
option(USE_EXPERIMENTAL "Build PCem with experimental code" OFF)
|
||||
|
@@ -42,9 +42,10 @@ configure options are :
|
||||
```
|
||||
-DCMAKE_BUILD_TYPE=Release : Generate release build. Recommended for regular use.
|
||||
-DCMAKE_BUILD_TYPE=Debug : Compile with debugging enabled.
|
||||
-DUSE_NETWORKING=OFF : Build with networking support.
|
||||
-DUSE_NETWORKING=ON : Build with networking support.
|
||||
-DUSE_PCAP_NETWORKING=ON : Build with pcap networking support. (Needs USE_NETWORKING to compile) Requires libpcap.
|
||||
-DUSE_ALSA=OFF : Build with support for MIDI output through ALSA. Requires libasound. (Linux Only)
|
||||
-DFORCE_X11=ON : Enables a hack to force X11 on Wayland systems. See #128 for details. (Linux Only)
|
||||
-DPLUGIN_ENGINE=OFF : Build with plugin support. Builds libpcem-plugin-api and links PCem with it.
|
||||
```
|
||||
|
||||
|
@@ -1,3 +1,7 @@
|
||||
if(FORCE_X11)
|
||||
set(PCEM_DEFINES ${PCEM_DEFINES} FORCE_X11)
|
||||
endif()
|
||||
|
||||
set(PCEM_PRIVATE_API ${PCEM_PRIVATE_API}
|
||||
${CMAKE_SOURCE_DIR}/includes/private/bswap.h
|
||||
${CMAKE_SOURCE_DIR}/includes/private/fdi2raw.h
|
||||
|
@@ -22,6 +22,11 @@ int main(int argc, char **argv)
|
||||
char **argv = __argv;
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_X11
|
||||
setenv("SDL_VIDEODRIVER", "x11", 1);
|
||||
setenv("GDK_BACKEND", "x11", 1);
|
||||
#endif
|
||||
|
||||
if (!pc_main(argc, argv))
|
||||
return -1;
|
||||
|
||||
|
Reference in New Issue
Block a user