Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2.3.0.0 64 bit, ALT+Tab / Loss of focus causes black scene
#1
Running in Fullscreen.

When I alt+tab out of the application or it otherwise looses focus, when I get back into Gear City the Scene Window will be black. Changing rooms etc. has no further effect.
Top and bottom menus are still visible as well as the Reports/ Menus they open.

Gear City "Classic" does not have this issue.

   
Reply
#2
What operating system? What rendering engine are you using? If you wait for a couple of seconds does the video come back? There should be a 1 or 2-second delay using DirectX9 before it restarts rendering everything on the screen. If you are using DirectX, switch to OpenGL if you're going to alt-tab out of full screen. Microsoft did not design DirectX9 to allow alt-tabbing. If you recall about 20 years ago, games would crash or not allow you to alt-tab out of full screen. That's the same technology. OpenGL shouldn't have this problem.
"great writers are indecent people, they live unfairly, saving the best part for paper.
good human beings save the world, so that bastards like me can keep creating art, become immortal.
if you read this after I am dead it means I made it." ― Charles Bukowski
Reply
#3
I duplicated the issue on my only Windows (10) bare metal machine. It does not happen in a VM. And it works fine on Linux.

OpenGL in Windows 10 and OSX 12 is not letting you switch windows.

A workaround is to use a borderless window. On Windows, this works only with DirectX9. You must set it using the external settings editor.

I suspect the Ogre14 library upgrades funded in Milestone #3 have caused issues with their Windows window creation. The maintainers of Ogre depreciated in favor of using other libraries some years ago. Bounty #96 addresses it on Windows. I will take a look next time I get around to bulk bug fixes to see if I can get it working. I can't guarantee full screen on Windows with the upgraded engine libraries short of that bounty.

The OpenGL3, DirectX11, Vulkan, or software rendering bounties may also resolve the issue for those respective renderers.

(For Mac, it should be working, as we're using GLFW. I suspect the same reason OpenGL Alt-tab is not working in Windows is the same as Mac. So, I may be able to resolve that one.)
"great writers are indecent people, they live unfairly, saving the best part for paper.
good human beings save the world, so that bastards like me can keep creating art, become immortal.
if you read this after I am dead it means I made it." ― Charles Bukowski
Reply
#4
(02-11-2024, 01:18 AM)Eric.B Wrote: I duplicated the issue on my only Windows (10) bare metal machine. It does not happen in a VM. And it works fine on Linux.

OpenGL in Windows 10 and OSX 12 is not letting you switch windows.

A workaround is to use a borderless window. On Windows, this works only with DirectX9. You must set it using the external settings editor.

I suspect the Ogre14 library upgrades funded in Milestone #3 have caused issues with their Windows window creation. The maintainers of Ogre depreciated in favor of using other libraries some years ago. Bounty #96 addresses it on Windows. I will take a look next time I get around to bulk bug fixes to see if I can get it working. I can't guarantee full screen on Windows with the upgraded engine libraries short of that bounty.

The OpenGL3, DirectX11, Vulkan, or software rendering bounties may also resolve the issue for those respective renderers.   

(For Mac, it should be working, as we're using GLFW. I suspect the same reason OpenGL Alt-tab is not working in Windows is the same as Mac. So, I may be able to resolve that one.)

Yes Windows 10.

And yes it is likely from Milestone #3 changes. This issue didn't present itself prior.

Borderless Window has never worked for me honestly.

Selection either or and Fullscreen and/or Borderless Window options for DirectX in the Video Settings editor  and saving will generate a successfull save message, and will still be selected if I exit and restart the Video Settings Editor, but it will still not be selectable in the Game Settings when starting GC.

With OpenGL Fullscreen this issue does not exist, but it will not truly alt+tab (application stays on top, which is alright by me)
Reply
#5
(02-11-2024, 11:10 AM)Rashi Wrote: Borderless Window has never worked for me honestly.

Selection either or and Fullscreen and/or Borderless Window options for DirectX in the Video Settings editor  and saving will generate a successfull save message, and will still be selected if I exit and restart the Video Settings Editor, but it will still not be selectable in the Game Settings when starting GC.

So using the external settings editor: https://wiki.gearcity.info/doku.php?id=g...ngs_editor

If you disable the full screen, enable borderless window, and have it set to DirectX9. Then save. You don't get a full-screen window?

It being broken in the game is a known issue that keeps not getting addressed, so I will look into that. In fact, I think I fixed it at some point, but then some code got overwritten and it regressed. That's the problem with maintaining so many different variants of the game.

Quote:With OpenGL Fullscreen this issue does not exist, but it will not truly alt+tab (application stays on top, which is alright by me)
Yup, the window does not minimize or go into the background. I believe the folks at Ogre may have changed their Window management stuff. They want folks to use a third-party library instead of Ogre managing it. Anyway, I plan to try minimizing the window manually when the focus is lost while in full-screen mode. But I don't think this is a game-breaking issue, so I'll try it when I do bulk bug fixes instead of losing a day+ of AeroMogul time solely on this issue. It's hard to bounce between two projects. I need to get my mind into Airplane mode. Smile
"great writers are indecent people, they live unfairly, saving the best part for paper.
good human beings save the world, so that bastards like me can keep creating art, become immortal.
if you read this after I am dead it means I made it." ― Charles Bukowski
Reply
#6
Quote:So using the external settings editor: https://wiki.gearcity.info/doku.php?id=g...ngs_editor

If you disable the full screen, enable borderless window, and have it set to DirectX9. Then save. You don't get a full-screen window?

It being broken in the game is a known issue that keeps not getting addressed, so I will look into that. In fact, I think I fixed it at some point, but then some code got overwritten and it regressed. That's the problem with maintaining so many different variants of the game.

Actually , yes it does work in Borderless Fullscreen Window mode then. (Just tried again paid attention to this detail)
It does however not reflect in the games settings menu.

Rather minor confusion then Wink


Attached Files Thumbnail(s)
   
Reply
#7
I'm having the same issue (Win10, DirectX).
With borderless window it works but it also make reading monthly reports really annoying
Reply
#8
(05-30-2024, 10:01 PM)AstraMeccanica Wrote: I'm having the same issue (Win10, DirectX).
With borderless window it works but it also make reading monthly reports really annoying

What is the issue you have with reading monthly reports in borderless window mode?

There isn't anything I can do with native full screen and DirectX9. If you must have native full screen, I recommend using OpenGL.
"great writers are indecent people, they live unfairly, saving the best part for paper.
good human beings save the world, so that bastards like me can keep creating art, become immortal.
if you read this after I am dead it means I made it." ― Charles Bukowski
Reply
#9
(05-30-2024, 10:09 PM)Eric.B Wrote:
(05-30-2024, 10:01 PM)AstraMeccanica Wrote: I'm having the same issue (Win10, DirectX).
With borderless window it works but it also make reading monthly reports really annoying

What is the issue you have with reading monthly reports in borderless window mode?

There isn't anything I can do with native full screen and DirectX9. If you must have native full screen, I recommend using OpenGL.

With borderless DirectX, the report window collapses and you have to resize it manually. I bet it's due to the visible windows app bar, so the solution could be force the app bar to automatically disappear. I'll let you know

As for Open GL, If I Alt+Tab while in full screen with OpenGL on, the GearCity applications always stays on top.

I'm going to try Rashi's solution
Reply
#10
(05-31-2024, 08:47 AM)AstraMeccanica Wrote:
(05-30-2024, 10:09 PM)Eric.B Wrote:
(05-30-2024, 10:01 PM)AstraMeccanica Wrote: I'm having the same issue (Win10, DirectX).
With borderless window it works but it also make reading monthly reports really annoying

What is the issue you have with reading monthly reports in borderless window mode?

There isn't anything I can do with native full screen and DirectX9. If you must have native full screen, I recommend using OpenGL.

With borderless DirectX, the report window collapses and you have to resize it manually. I bet it's due to the visible windows app bar, so the solution could be force the app bar to automatically disappear. I'll let you know

I'm not sure what you mean by this. The reports windows in the game are not resizable. They're fixed to 1024x512 or 1024x1024, depending on your resolution. If you have "Dynamic Report Size" enabled, they'll expand to the height of your resolution, but they're still not user-resizable. If you could provide a video or a screenshot of what you're talking about, that would be helpful.

To be clear, this is the reports window in the game: https://wiki.gearcity.info/doku.php?id=g...rts_window

If you mean something else, I'll need a screenshot of it.
"great writers are indecent people, they live unfairly, saving the best part for paper.
good human beings save the world, so that bastards like me can keep creating art, become immortal.
if you read this after I am dead it means I made it." ― Charles Bukowski
Reply
#11
(05-31-2024, 09:13 AM)Eric.B Wrote:
(05-31-2024, 08:47 AM)AstraMeccanica Wrote:
(05-30-2024, 10:09 PM)Eric.B Wrote:
(05-30-2024, 10:01 PM)AstraMeccanica Wrote: I'm having the same issue (Win10, DirectX).
With borderless window it works but it also make reading monthly reports really annoying

What is the issue you have with reading monthly reports in borderless window mode?

There isn't anything I can do with native full screen and DirectX9. If you must have native full screen, I recommend using OpenGL.

With borderless DirectX, the report window collapses and you have to resize it manually. I bet it's due to the visible windows app bar, so the solution could be force the app bar to automatically disappear. I'll let you know

I'm not sure what you mean by this. The reports windows in the game are not resizable. They're fixed to 1024x512 or 1024x1024, depending on your resolution. If you have "Dynamic Report Size" enabled, they'll expand to the height of your resolution, but they're still not user-resizable. If you could provide a video or a screenshot of what you're talking about, that would be helpful

To be clear, this is the reports window in the game: https://wiki.gearcity.info/doku.php?id=g...rts_window

If you mean something else, I'll need a screenshot of it.

I'm at work right now (even if It doesn't show biggrin ). What I mean by resize is
  • in full screen, the report is wholy visible
  • borderless (again, probably because of Windows App Bar) it only shows part of the content. So I have to zoom in/out and scroll up/down to look at the numbers I need
I'll post screenshot when possible.

(There is also another thing that happens to me from time to time, but I didn't post because I don't really know how to describe it or look it up.
Every once in a while when I'm in the safe / bank / broker screen and I go back, the game freezes. A black screen with the white outline of the safe is visible for a few seconds. Then the game quits.)
Reply
#12
(05-31-2024, 09:31 AM)AstraMeccanica Wrote:
(05-31-2024, 09:13 AM)Eric.B Wrote:
(05-31-2024, 08:47 AM)AstraMeccanica Wrote:
(05-30-2024, 10:09 PM)Eric.B Wrote:
(05-30-2024, 10:01 PM)AstraMeccanica Wrote: I'm having the same issue (Win10, DirectX).
With borderless window it works but it also make reading monthly reports really annoying

What is the issue you have with reading monthly reports in borderless window mode?

There isn't anything I can do with native full screen and DirectX9. If you must have native full screen, I recommend using OpenGL.

With borderless DirectX, the report window collapses and you have to resize it manually. I bet it's due to the visible windows app bar, so the solution could be force the app bar to automatically disappear. I'll let you know

I'm not sure what you mean by this. The reports windows in the game are not resizable. They're fixed to 1024x512 or 1024x1024, depending on your resolution. If you have "Dynamic Report Size" enabled, they'll expand to the height of your resolution, but they're still not user-resizable. If you could provide a video or a screenshot of what you're talking about, that would be helpful

To be clear, this is the reports window in the game: https://wiki.gearcity.info/doku.php?id=g...rts_window

If you mean something else, I'll need a screenshot of it.

I'm at work right now (even if It doesn't show biggrin ). What I mean by resize is
  • in full screen, the report is wholy visible
  • borderless (again, probably because of Windows App Bar) it only shows part of the content. So I have to zoom in/out and scroll up/down to look at the numbers I need
I'll post screenshot when possible.

If you click the link I provide, it looks like the "short" window instead of the "long" window? If so, it's because the game is running less than 1050px tall. This is by design, because DirectX requires power by 2 textures, so we can't use a 1024 texture for the web browser + the report window title bar.

Solution to this is OpenGL with dynamic reports size enabled.


Quote:(There is also another thing that happens to me from time to time, but I didn't post because I don't really know how to describe it or look it up.
Every once in a while when I'm in the safe / bank / broker screen and I go back, the game freezes. A black screen with the white outline of the safe is visible for a few seconds. Then the game quits.)

Once again, the issue is with DirectX9 flushing its GPU memory when using native fullscreen and alt-tabbing out of it. When DirectX9 goes to reload the memory, it finds that much of it is missing, and it crashes. This is why most games have removed native fullscreen in favor of borderless windows, or with older games, disabled alt-tabbing altogether.

Sadly, you're having issues with your drivers fullscreening OpenGL2, but the solution is to use OpenGL. I suggest just using the game in windowed mode. Problem solved. Honestly, I should have disabled native fullscreen a decade ago like all the big game engines did.

There are some chances the OpenGL3, DirectX11, and SDL windowing bounties could fix your issues. But it's not guaranteed because it's third party, open source software, and I have never used these versions. That's the downside with funding these engine upgrades.
"great writers are indecent people, they live unfairly, saving the best part for paper.
good human beings save the world, so that bastards like me can keep creating art, become immortal.
if you read this after I am dead it means I made it." ― Charles Bukowski
Reply
#13
With OpenGL and Dynamic Report Size checked. 1920x1080
I have to manually scroll to read sales figures
[Image: IwP5aSC.png]
Reply
#14
(05-31-2024, 06:10 PM)AstraMeccanica Wrote: With OpenGL and Dynamic Report Size checked. 1920x1080
I have to manually scroll to read sales figures
[Image: IwP5aSC.png]

Yes, you will have to scroll down to see the full sales report. I would be surprised if you didn't have to at any resolution smaller than 4k.

Also note, GUI Scaling will increase the web browser zoom levels. If you want the Browser to be as small as possible, use the smallest zoom level.

EDIT: Also to point out, because you're resolution is less than 1050 height, the game is using the small reports window, thus why the browser controls are at the bottom. Reduce your Windows Taskbar size, or set it to auto-hide before launching the game.
"great writers are indecent people, they live unfairly, saving the best part for paper.
good human beings save the world, so that bastards like me can keep creating art, become immortal.
if you read this after I am dead it means I made it." ― Charles Bukowski
Reply
#15
(05-31-2024, 07:35 PM)Eric.B Wrote:
(05-31-2024, 06:10 PM)AstraMeccanica Wrote: With OpenGL and Dynamic Report Size checked. 1920x1080
I have to manually scroll to read sales figures
[Image: IwP5aSC.png]

Yes, you will have to scroll down to see the full sales report. I would be surprised if you didn't have to at any resolution smaller than 4k.

I didn't have to until I started playing the DLC. If my memory serves me well, it worked fine on the Vanilla.
But it should be noted that Vanilla never gave me problem with DirectX or AltTab (apart waiting 1-2 seconds for the game to render buttons)

(The screenshot above was taken with a resolution set to 1920x1080 and no visible taskbar)
Reply
#16
(06-01-2024, 09:20 AM)AstraMeccanica Wrote: I didn't have to until I started playing the DLC. If my memory serves me well, it worked fine on the Vanilla.
But it should be noted that Vanilla never gave me problem with DirectX or AltTab (apart waiting 1-2 seconds for the game to render buttons)

Contributors funded Bounty 148, which upgraded the rendering engine we use. We went from a 2018 build to a few weeks old build. Microsoft discontinued DirectX9 in 2011. And Ogre largely depreciated it in favor of DirectX11 several years ago. We're also using Ogre's depreciated Windows API code to create windows. SDL is the recommended and default window maker for Ogre now. In short, the game was written for 2010 tech. Upgrading the libraries did not rewrite what the game was written for. The further we get away from 2010, the more incompatibility bugs unless we fund additional improvements to the engine. For every one bug fix or improvement in Ogre for DirectX9 there are dozens for DirectX11. And some changes to the engine for these more modern renderers likely break the older renderers. Microsoft has shrugged DX9 off to an emulator inside DX12. And even Intel uses WINE from Linux to run DirectX9 with their dedicated GPUs. GC:2nd Gear is probably the largest game, and maybe the only game, using the DirectX9 renderer with the latest Ogre. Anyone who started a game in Ogre after 2013 uses OpenGL3, and anyone after 2017 uses DirectX11. No one is using DirectX9 anymore.

I did warn in this bounty several times that it could introduce more bugs to the game than it fixes. The developers of Ogre removed hack fixes for Microsoft's incompetence with DirectX9. I will upgrade the libraries now and then to keep them fresh until we hit the end of Ogre14. We all can hope that Bounties #146, #147, or #96 improve the situation since they're more modern APIs officially supported by Ogre, driver vendors, and Microsoft.

For now, here are the options:
  • You could try installing native DirectX9 instead of using the emulated DX9 that Windows10+ uses now.
  • You could play in windowed mode and live with using your mouse wheel a little.
  • You could buy a larger monitor
  • You could play 2.2.0.0, which is still in the previous builds tab and is the last build using 2018 Ogre. Then hope that I, Ogre (less likely), or Microsoft (unlikely) improve the situation. Or we move to new APIs.
  • You could install Linux, which the game works flawlessly on.



Quote:(The screenshot above was taken with a resolution set to 1920x1080 and no visible taskbar)

If you take the picture you uploaded and measure in pixels from the top to the bottom, you'll find that the title bar stops at 44px. This is the default for Windows. If you go to the bottom it stops at 1070px. Assuming you did not resize the photo, 1070px - 44px = 1026px. The rendering window is 1026px tall. 1026px is smaller than 1050px the game needs for the "large" window, so it loads the "small" window. So, this is by design and not a bug. What I can do, however, is disable small reports windows if you have dynamic report sizes enabled. That would give you 100-200 pixels back at the bottom, but you're still not going to see the full sales table without scrolling.

You could resize the window decorations inside windows in the meantime if you really must have those extra pixels in the report. If I recall, there is a small icon settings in Windows that would give you those extra pixels.
"great writers are indecent people, they live unfairly, saving the best part for paper.
good human beings save the world, so that bastards like me can keep creating art, become immortal.
if you read this after I am dead it means I made it." ― Charles Bukowski
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)