Skip to content

Commit

Permalink
Use the correct subsystem
Browse files Browse the repository at this point in the history
  • Loading branch information
Querijn committed Dec 11, 2024
1 parent caada22 commit b4d9ea3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sokol_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
On Windows, SOKOL_DLL will define SOKOL_APP_API_DECL as __declspec(dllexport)
or __declspec(dllimport) as needed.
if SOKOL_WIN32_FORCE_MAIN and SOKOL_WIN32_FORCE_WINMAIN are both defined,
it is up to the developer to define the desired subsystem.
On Linux, SOKOL_GLCORE can use either GLX or EGL.
GLX is default, set SOKOL_FORCE_EGL to override.
Expand Down Expand Up @@ -2186,8 +2189,11 @@ inline void sapp_run(const sapp_desc& desc) { return sapp_run(&desc); }
#include <windows.h>
#include <windowsx.h>
#include <shellapi.h>
#if !defined(SOKOL_NO_ENTRY) // if SOKOL_NO_ENTRY is defined, it's the applications' responsibility to use the right subsystem
#if defined(SOKOL_WIN32_FORCE_MAIN)
#if !defined(SOKOL_NO_ENTRY) // if SOKOL_NO_ENTRY is defined, it's the application's responsibility to use the right subsystem

#if defined(SOKOL_WIN32_FORCE_MAIN) && defined(SOKOL_WIN32_FORCE_WINMAIN)
// If both are defined, it's the application's responsibility to use the right subsystem
#elif defined(SOKOL_WIN32_FORCE_MAIN)
#pragma comment (linker, "/subsystem:console")
#else
#pragma comment (linker, "/subsystem:windows")
Expand Down

0 comments on commit b4d9ea3

Please sign in to comment.