Democracy 4

Democracy 4

View Stats:
Borderless Windowed Mode
Hi guys.

I have a 1920x1080 montior and there appears to be no way of running in a window of that resolution. My only proper options are Full Desktop Display (which will not allow me to run in a window) and 1680 x 1050 Display (which is naturally too small to fill the screen).

Is there not a borderless window option for the 1920x1080 resolution?

Alternatively is there a way of setting to a 1920x1080 window so that i can use Borderless Gaming to make into a borderless window mode?

I tried manually editing prefs.ini but this just reset to the Full Desktop Display

Many thanks
< >
Showing 1-15 of 18 comments
cliffski  [developer] Aug 9, 2021 @ 11:07am 
hmmm. i thought it defaulted to borderless. I will check this first thing tomorrow...
cliffski  [developer] Aug 10, 2021 @ 2:54am 
Hmm, I checked and border-less is our default if the game is set to the same resolution as the desktop. Are you sure its not in borderless mode? frankly the only way to tell is to check that alt+tab works perfectly for you. I assume thats what you are after?

Can you post the contents of this file:
\my documents\my games\democracy 4\debug.txt
and
\my documents\my games\democracy 4\drawdebug.txt
It seems to be defaulting to fullscreen for me. When i try untick the fullscreen option when on full desktop display it simply reverts to fullscreen.

Yes the issue is that i have two monitors so when i alt tab or click on my other monitor it minimises the display rather than keeping the game on the screen.

Debug.txt:

[16:50:30:963]- ----DEBUG FILE----
[16:50:30:963]- Windows 7 detected
[16:50:30:963]- Game version: 1.34
[16:50:30:963]- setlocale was a success. Current locale is [C] should be C
[16:50:30:964]- Loading app options
[16:50:30:964]- app options loaded
[16:50:30:964]-
GetLogicalProcessorInformation results:

[16:50:30:964]- Number of NUMA nodes: 1

[16:50:30:964]- Number of physical processor packages: 1

[16:50:30:965]- Number of processor cores: 8

[16:50:30:965]- Number of logical processors: 16

[16:50:30:965]- Number of processor L1/L2/L3 caches: 16/8/2

[16:50:30:965]- Setting Color palette
[16:50:30:965]- Updating BG shader
[16:50:30:965]- BG shader updated
[16:50:30:965]- Saving options
[16:50:30:966]- Options saved
[16:50:30:966]- Color palette set
[16:50:30:966]- Saving options
[16:50:30:967]- Options saved
[16:50:30:970]- Desktop resolution is 1920 x 1080
[16:50:30:970]- Loaded Config: 1920x1080@0 scale1.00 [windowed]
[16:50:30:971]- Failed to open file: C:\Users\Joe\Documents/My Games/democracy4/mod_status.ini : 2
[16:50:30:971]- GBufferedFile failed to open file [C:\Users\Joe\Documents/My Games/democracy4/mod_status.ini]
[16:50:31:225]- Setting Color palette
[16:50:31:225]- Updating BG shader
[16:50:31:225]- BG shader updated
[16:50:31:225]- Saving options
[16:50:31:226]- Options saved
[16:50:31:226]- Color palette set
[16:50:31:227]- GEngine::Init Engine mode: 1920x1080
[16:50:31:227]- GEngine::Desktop mode: 1920x1080
[16:50:31:227]- Matching desktop res
[16:50:31:227]- Calling SDL_CreateWindow: 1920x1080@0 [fullscreen]
[16:50:31:558]- Initialising 3D Engine
[16:50:31:561]- OpenGL Vendor : NVIDIA Corporation
[16:50:31:561]- OpenGL Renderer: NVIDIA GeForce RTX 3070/PCIe/SSE2
[16:50:31:561]- OpenGL Version : 4.6.0 NVIDIA 471.41
[16:50:31:562]- Initialising global vertex buffer
[16:50:31:731]- Initialisizng Vector Engine
[16:50:31:985]- Setting vector Engine Dimensions
[16:50:31:987]- VE Clearing existing textures to replace with new [1920]x[1080]
[16:50:31:988]- Initializing Text
[16:50:31:988]- Creating font config
[16:50:31:988]- font config created
[16:50:31:988]- adding font directory
[16:50:32:118]- font map created
[16:50:32:118]- creating pango layout
[16:50:32:126]- pango layout created
[16:50:32:126]- PANGO context font map font families:
[16:50:32:126]- Noto Sans
[16:50:32:126]- Sans
[16:50:32:126]- Serif
[16:50:32:126]- Monospace
[16:50:32:129]- Attempting to initialise steam
[16:50:32:230]- Steam initialisation success
[16:50:32:230]- Checking steam workshop subscriptions...
[16:50:32:232]- Requesting steam stats...
[16:50:32:232]- ...Steam stats requested
[16:50:32:232]- Initializing Input
[16:50:32:232]- Initializing sound
[16:50:32:233]- Initialising Sound Engine
[16:50:32:233]- Resetting Sound volumes to maximum
[16:50:32:233]- Loading in volume presets
[16:50:32:233]- Creating IrrKlang Device
[16:50:32:233]- Sound Engine loaded as
[16:50:32:283]- ESOD_AUTO_DETECT worked ok
[16:50:32:283]- Finished Initialising Sound Engine
[16:50:32:768]- Setting game mode to splashscreen
[16:50:32:772]- Resizing new game mode
[16:50:32:772]- Activating new game mode
[16:50:32:772]- Forcing music mode
[16:50:32:827]- Music mode forced
[16:50:32:827]- Game mode activated
[16:50:32:852]- Socialism LB size:51020

[16:50:32:853]- Liberalism LB size:51018

[16:50:32:853]- Found 0 workshop subscriptions
[16:50:32:854]- Received stats and achievements from Steam

[16:50:32:856]- Exiting splashscreen
[16:50:32:980]- Deactivating old game mode
[16:50:32:981]- Resizing new game mode
[16:50:32:981]- Activating new game mode
[16:50:32:981]- Game mode activated
[16:50:32:981]- Missing Global variable [RESTART_MODE]:D:\programming\democracy 4\builds\Democracy4\src\_all_operating_systems\app\app_options.cpp 161

[16:50:36:311]- Display mode found (1920 x 1080)
[16:50:36:315]- Display mode found (1920 x 1080)
[16:50:36:315]- Display mode found (1920 x 1080)
[16:50:36:315]- Display mode found (1680 x 1050)
[16:50:36:315]- Display mode found (1680 x 1050)
[16:50:36:315]- Display mode found (1600 x 1024)
[16:50:36:315]- Display mode found (1600 x 1024)
[16:50:36:315]- Display mode found (1600 x 900)
[16:50:36:315]- Display mode found (1600 x 900)
[16:50:36:315]- Display mode found (1440 x 900)
[16:50:36:315]- Display mode found (1366 x 768)
[16:50:36:315]- Display mode found (1360 x 768)
[16:50:36:315]- Display mode found (1280 x 1024)
[16:50:36:315]- Display mode found (1280 x 1024)
[16:50:36:316]- Display mode found (1280 x 960)
[16:50:36:316]- Display mode found (1280 x 800)
[16:50:36:316]- Display mode found (1280 x 768)
[16:50:36:317]- Display mode found (1280 x 720)
[16:50:36:317]- Display mode found (1280 x 720)
[16:50:36:317]- Display mode found (1280 x 720)
[16:50:36:317]- Display mode found (1176 x 664)
[16:50:36:317]- Display mode found (1176 x 664)
[16:50:36:317]- Display mode found (1176 x 664)
[16:50:36:317]- Display mode found (1152 x 864)
[16:50:36:317]- Display mode found (1024 x 768)
[16:50:36:317]- Display mode found (1024 x 768)
[16:50:36:317]- Display mode found (1024 x 768)
[16:50:36:317]- Display mode found (800 x 600)
[16:50:36:317]- Display mode found (800 x 600)
[16:50:36:317]- Display mode found (800 x 600)
[16:50:36:317]- Display mode found (800 x 600)
[16:50:36:317]- Display mode found (720 x 576)
[16:50:36:318]- Display mode found (720 x 480)
[16:50:36:318]- Display mode found (720 x 480)
[16:50:36:318]- Display mode found (640 x 480)
[16:50:36:318]- Display mode found (640 x 480)
[16:50:36:318]- Display mode found (640 x 480)
[16:50:36:318]- Display mode found (640 x 480)
[16:50:36:344]- Display mode found (1920 x 1080)
[16:50:36:344]- Display mode found (1920 x 1080)
[16:50:36:344]- Display mode found (1920 x 1080)
[16:50:36:344]- Display mode found (1680 x 1050)
[16:50:36:345]- Display mode found (1680 x 1050)
[16:50:36:345]- Display mode found (1600 x 1024)
[16:50:36:345]- Display mode found (1600 x 1024)
[16:50:36:345]- Display mode found (1600 x 900)
[16:50:36:345]- Display mode found (1600 x 900)
[16:50:36:345]- Display mode found (1440 x 900)
[16:50:36:345]- Display mode found (1366 x 768)
[16:50:36:345]- Display mode found (1360 x 768)
[16:50:36:345]- Display mode found (1280 x 1024)
[16:50:36:345]- Display mode found (1280 x 1024)
[16:50:36:345]- Display mode found (1280 x 960)
[16:50:36:345]- Display mode found (1280 x 800)
[16:50:36:345]- Display mode found (1280 x 768)
[16:50:36:345]- Display mode found (1280 x 720)
[16:50:36:345]- Display mode found (1280 x 720)
[16:50:36:346]- Display mode found (1280 x 720)
[16:50:36:346]- Display mode found (1176 x 664)
[16:50:36:346]- Display mode found (1176 x 664)
[16:50:36:346]- Display mode found (1176 x 664)
[16:50:36:346]- Display mode found (1152 x 864)
[16:50:36:346]- Display mode found (1024 x 768)
[16:50:36:346]- Display mode found (1024 x 768)
[16:50:36:346]- Display mode found (1024 x 768)
[16:50:36:346]- Display mode found (800 x 600)
[16:50:36:346]- Display mode found (800 x 600)
[16:50:36:347]- Display mode found (800 x 600)
[16:50:36:347]- Display mode found (800 x 600)
[16:50:36:347]- Display mode found (720 x 576)
[16:50:36:347]- Display mode found (720 x 480)
[16:50:36:347]- Display mode found (720 x 480)
[16:50:36:347]- Display mode found (640 x 480)
[16:50:36:347]- Display mode found (640 x 480)
[16:50:36:347]- Display mode found (640 x 480)
[16:50:36:347]- Display mode found (640 x 480)
[16:50:39:94]- Saving options
[16:50:39:96]- Options saved
[16:50:40:260]- Window close
[16:50:40:261]- Releasing Resources
[16:50:40:261]- Starting thread:[1][Post Session]
[16:50:40:261]- Start of SIM_Internet::OpenLink
[16:50:40:262]- Post Session thread created OK
[16:50:40:262]- releasing GEngine
[16:50:40:269]- End of SIM_Internet::OpenLink
[16:50:40:269]- democracy4/server/post_session.php?&ver=1.34&duration=0.14&palette=Dark&width=1920&height=1080&ave_fps=60.55&worst_fps=55.00
[16:50:40:270]- SIM_Internet::DownloadFile(C:\Users\Joe\Documents/My Games/democracy4/webdebug/tmp785.html)
[16:50:40:511]- SIM_Internet::DownloadFile ends
[16:50:40:511]- Start of SIM_Internet::CloseLink
[16:50:40:511]- End of SIM_Internet::CloseLink
[16:50:40:511]- Ending thread: [1][Post Session]
[16:50:40:854]- GEngine Released
[16:50:40:860]- Thread manager Closed
[16:50:40:860]- SDL_QUIT message received
[16:50:40:861]- Start of SIM_Internet::CloseLink
[16:50:40:861]- End of SIM_Internet::CloseLink



Drawdebug.txt:


Creating shader from file:[data/shaders/circleblend.fx]
Creating shader from file:[data/shaders/greyscale.fx]
Creating shader from file:[data/shaders/locked_achievement.fx]
Initialising Render target of 2048 X 2048 rt_transition
rt_transition
Initialising Render target of 2048 X 2048 rt_iconcache
rt_iconcache
Initialising Cairo target of 2048 X 2048 DTE_VT_0_0
DTE_VT_0_0
Initialising Cairo target of 2048 X 2048 DTE_VT_1_0
DTE_VT_1_0

cliffski  [developer] Aug 10, 2021 @ 10:37am 
Hmmm, tbh the game may output thats its fullscreen, but its actually still setting the internal flags for creating the window to also be borderless, so it should actually be in borderless mode. I presume its definitely losing focus when you click on the other monitor?
Ill do some reading and see if this is a known issue with opengl and SDL. Annoyingly I no longer use 2 monitors, so its tricky to test!
Yes there is a lag and it minimises the game when i click the other monitor as though it was a fullscreen app. Thanks!
cliffski  [developer] Aug 11, 2021 @ 2:52am 
I've done some research.
I've changed the game code so it should be much more explicit about telling me in those debug logs what its doing. There is some code that *explicitly* says that if you have >1 monitor, and the game is fullscreen on one of them... then do NOT minimize when you lose focus!
I suspect that something is going wrong in the detection of that scenario in your case.

Anyway, these changes will be in the next update, hopefully Friday, so if the next update does not fix it, please post the debug.txt log again and I might know what it is then.
Sorry about this, we are using a 3rd party engine framework that I now totally regret ever using!
Interesting - we shall see if it fixes! Cheers Cliff i'll keep an eye out.
Just tried playing again. Still having the issue. Thanks.
cliffski  [developer] Oct 22, 2021 @ 10:10am 
Hi, could you post the debug files for me to take a look?
[13:0:55:841]- ----DEBUG FILE----
[13:0:55:841]- Windows 7 detected
[13:0:55:841]- Game version: 1.41
[13:0:55:841]- setlocale was a success. Current locale is [C] should be C
[13:0:55:841]- Loading app options
[13:0:55:841]- app options loaded
[13:0:55:842]-
GetLogicalProcessorInformation results:

[13:0:55:842]- Number of NUMA nodes: 1

[13:0:55:842]- Number of physical processor packages: 1

[13:0:55:842]- Number of processor cores: 8

[13:0:55:842]- Number of logical processors: 16

[13:0:55:842]- Number of processor L1/L2/L3 caches: 16/8/2

[13:0:55:842]- Setting Color palette
[13:0:55:842]- Updating BG shader
[13:0:55:842]- BG shader updated
[13:0:55:842]- Saving options
[13:0:55:842]- Options saved
[13:0:55:842]- Color palette set
[13:0:55:842]- Saving options
[13:0:55:842]- Options saved
[13:0:55:846]- Desktop resolution is 1920 x 1080
[13:0:55:846]- Loaded Config: 1920x1080@0 scale1.00 [windowed]
[13:0:55:846]- Failed to open file: C:\Users\Joe\Documents/My Games/democracy4/mod_status.ini : 2
[13:0:55:846]- GBufferedFile failed to open file [C:\Users\Joe\Documents/My Games/democracy4/mod_status.ini]
[13:0:56:101]- Setting Color palette
[13:0:56:101]- Updating BG shader
[13:0:56:101]- BG shader updated
[13:0:56:101]- Saving options
[13:0:56:101]- Options saved
[13:0:56:101]- Color palette set
[13:0:56:101]- GEngine::Init Engine mode: 1920x1080
[13:0:56:101]- SDL_GetNumVideoDisplays returned 2
[13:0:56:101]- GEngine::Desktop mode: 1920x1080
[13:0:56:102]- Setting hint SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS 0
[13:0:56:102]- Matching desktop res
[13:0:56:102]- Calling SDL_CreateWindow: 1920x1080@0 [fullscreen]
[13:0:56:370]- Initialising 3D Engine
[13:0:56:378]- OpenGL Vendor : NVIDIA Corporation
[13:0:56:378]- OpenGL Renderer: NVIDIA GeForce RTX 3070/PCIe/SSE2
[13:0:56:378]- OpenGL Version : 4.6.0 NVIDIA 472.12
[13:0:56:378]- Initialising global vertex buffer
[13:0:56:526]- Failed to open file: C:\Users\Joe\Documents/My Games/democracy4/stats.ini : 2
[13:0:56:526]- GBufferedFile failed to open file [C:\Users\Joe\Documents/My Games/democracy4/stats.ini]
[13:0:56:579]- Initialisizng Vector Engine
[13:0:56:827]- Setting vector Engine Dimensions
[13:0:56:828]- VE Clearing existing textures to replace with new [1920]x[1080]
[13:0:56:829]- Initializing Text
[13:0:56:829]- Creating font config
[13:0:56:829]- font config created
[13:0:56:829]- adding font directory
[13:0:56:961]- font map created
[13:0:56:961]- creating pango layout
[13:0:56:968]- pango layout created
[13:0:56:968]- PANGO context font map font families:
[13:0:56:968]- Noto Sans
[13:0:56:968]- Sans
[13:0:56:968]- Serif
[13:0:56:968]- Monospace
[13:0:56:970]- Attempting to initialise steam
[13:0:57:62]- Steam initialisation success
[13:0:57:62]- Checking steam workshop subscriptions...
[13:0:57:64]- Requesting steam stats...
[13:0:57:64]- ...Steam stats requested
[13:0:57:64]- Initializing Input
[13:0:57:64]- Initializing sound
[13:0:57:64]- Initialising Sound Engine
[13:0:57:64]- Resetting Sound volumes to maximum
[13:0:57:64]- Loading in volume presets
[13:0:57:64]- Creating IrrKlang Device
[13:0:57:65]- Sound Engine loaded as
[13:0:57:114]- ESOD_AUTO_DETECT worked ok
[13:0:57:114]- Finished Initialising Sound Engine
[13:0:57:653]- Failed to open file: C:\Users\Joe\Documents/My Games/democracy4/tut_seen.ini : 2
[13:0:57:653]- GBufferedFile failed to open file [C:\Users\Joe\Documents/My Games/democracy4/tut_seen.ini]
[13:0:57:653]- Setting game mode to splashscreen
[13:0:57:670]- Resizing new game mode
[13:0:57:670]- Activating new game mode
[13:0:57:670]- Forcing music mode
[13:0:57:702]- Music mode forced
[13:0:57:702]- Game mode activated
[13:0:57:709]- Socialism LB size:59909

[13:0:57:709]- Liberalism LB size:59907

[13:0:57:709]- Found 0 workshop subscriptions
[13:0:57:761]- Received stats and achievements from Steam

[13:0:57:763]- Exiting splashscreen
[13:0:57:876]- Deactivating old game mode
[13:0:57:877]- Resizing new game mode
[13:0:57:877]- Activating new game mode
[13:0:57:877]- Game mode activated
[13:0:57:877]- Missing Global variable [RESTART_MODE]:D:\programming\democracy 4\builds\Democracy4\src\_all_operating_systems\app\app_options.cpp 161

[13:1:2:840]- Window close
[13:1:2:840]- Releasing Resources
[13:1:2:840]- Starting thread:[1][Post Session]
[13:1:2:840]- Start of SIM_Internet::OpenLink
[13:1:2:841]- Post Session thread created OK
[13:1:2:841]- releasing GEngine
[13:1:2:848]- End of SIM_Internet::OpenLink
[13:1:2:849]- democracy4/server/post_session.php?&ver=1.41&duration=0.11&palette=Light&width=1920&height=1080&ave_fps=60.31&worst_fps=55.00
[13:1:2:849]- SIM_Internet::DownloadFile(C:\Users\Joe\Documents/My Games/democracy4/webdebug/tmp785.html)
[13:1:3:92]- SIM_Internet::DownloadFile ends
[13:1:3:92]- Start of SIM_Internet::CloseLink
[13:1:3:93]- End of SIM_Internet::CloseLink
[13:1:3:93]- Ending thread: [1][Post Session]
[13:1:3:497]- GEngine Released
[13:1:3:501]- Thread manager Closed
[13:1:3:501]- SDL_QUIT message received
[13:1:3:502]- Start of SIM_Internet::CloseLink
[13:1:3:502]- End of SIM_Internet::CloseLink




Creating shader from file:[data/shaders/circleblend.fx]
Creating shader from file:[data/shaders/greyscale.fx]
Creating shader from file:[data/shaders/locked_achievement.fx]
Initialising Render target of 2048 X 2048 rt_transition
rt_transition
Initialising Render target of 2048 X 2048 rt_iconcache
rt_iconcache
Initialising Cairo target of 2048 X 2048 DTE_VT_0_0
DTE_VT_0_0
Initialising Cairo target of 2048 X 2048 DTE_VT_1_0
DTE_VT_1_0
cliffski  [developer] Oct 25, 2021 @ 4:29am 
Well thats disappointing as we clearly tell SDL to NOT do that!

[13:0:56:102]- Setting hint SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS 0

I will see if its a known bug. I wish I'd never used *any* middleware...

edit: does this fix it for you?
Actually you can use environment variables in Steam. Right click the game, select properties, then set launch options. Put this in the field:
SDL_VIDEO_MINIMIZE_ON_FOCUS_LOST=0 %command%
Then click OK and you're done.

In any case I've made a code change for the next version that very aggressively forces it to behave this way.... hopefully it works this time.
Last edited by cliffski; Oct 25, 2021 @ 4:37am
Fails to launch when i put that in arguments.

https://i.imgur.com/aLYHWVc.png

Marconius Feb 26, 2022 @ 3:56am 
Old thread, but I'm having the same issue as the OP in the latest version: unticking Fullscreen mode just doesn't seem to work, it keeps coming back. Every time I click out to my other monitor, the game kind of shows a loading screen or some kind of fixed image.
WBruce Jul 6, 2022 @ 12:52pm 
Same issue here using a ultrawide monitor.
Nelson Brockes Jul 8, 2022 @ 6:09am 
Same issue here on Samsung G7 2560 x 1440 monitor.
< >
Showing 1-15 of 18 comments
Per page: 1530 50

Date Posted: Aug 9, 2021 @ 10:28am
Posts: 18