VOGONS

Common searches


DOSBox-X branch

Topic actions

Reply 1320 of 2397, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

A quick word of thanks, TheGreatCodeholio, for your complete one-click build environment. I downloaded your source code, opened it in VS 2017, and a few minutes later I had a working build - complete with SDL etc. newly compiled. Well done - and thank you!

Reply 1321 of 2397, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

Testing the sdl12 with async window handling in Windows 10 (with different output modes). Systems and drivers may vary, but it is stabler where reverting "Move DIB window parent shutdown to SQL_Quit". Also, the alt-tab function hasn't worked before or after this improvement.

Windowed 3dfx/gl mode seems that it is missing the parent window. The game window is borderless and runs normally, but the rest of the monitor screen is blank. In addition, mouse and keyboard input are attached to the desktop window, not the game window, so it is not possible to exit.

Reply 1322 of 2397, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

The idea behind moving the DIB window shutdown to SDL_Quit is to prevent the window from flickering a lot on the screen when DOSBox-X quits and re-initializes the SDL video system when it switches between surface, OpenGL and Direct3D output.

ALT+TAB from fullscreen works on my system. Do you mean it doesn't work when 3Dfx emulation is involved?

I never thought to test 3Dfx emulation with the new code! Will do that tomorrow.

DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.

Reply 1323 of 2397, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

Noted: https://github.com/joncampbell123/dosbox-x/issues/476

DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.

Reply 1324 of 2397, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

On return from any fullscreen alt-tab, then the game window is blank with a border. This occurred before the async work.

On a separate issue, I think the fullscreen 3dfx/gl mode intentionally disables alt-tab.

Thanks!

Reply 1325 of 2397, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

I appreciate the further enhancements to the async window handling branch. The alt-tab now works in fullscreen in my system. Also, the 3dfx/gl mode does not have the drawbacks of entering fullscreen. I agree with your solution since any fullscreen scaling produces a lower quality display along with the changes in Windows 10.

One issue is where hiding the menu while in 3dfx/gl mode leads to flickering in the game window.

Reply 1326 of 2397, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

I'll add code to disable hide/show menu bar in 3dfx mode. In case you want the menu bar during that time, I'll have it automatically enable the menu bar when switching to 3dfx mode.

I noticed that when the code DID allow resizing during 3dfx mode, that OpenGL in Windows would somehow work with it but some geometry in the demo (I tested Trip and Nature off of scene.org) would disappear or break.

At some point I would like to enable resizing when OpenGL 3dfx mode is eventually modified to render to a texture, then stretch the texture to the window, so that pixel-perfect rendering of the output can work as far as the game is concerned while offering a way to size up for modern high resolution displays.

DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.

Reply 1328 of 2397, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

Is 3dfx/gl mode associated with both Windows SDL video drivers: directx and windib? If so, could dosbox-x print that information before entering that mode?

Also, with async window handling, are all accessory windows handled as expected? Examples are the debug window and any log window that is available. Do they close independently of dosbox-x?

Reply 1329 of 2397, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

In the builds I make, the "directx" drivers in SDL are disabled, so it's just windib. From that, DOSBox-X offers output=surface, output=opengl, and output=direct3d.

The async code changes were made in order to accomplish minimal changes to the SDL library. The only change is that the SDL window managed by windib is a child window of a parent window managed by another thread, so that resize, move and menu events to the parent window do not block DOSBox-X or SDL. Debug output is still sent to the console window, which is maintained by Windows.

The parent and child windows are set up so that a WM_CLOSE sent to the parent is handled by the child. If the parent is given a WM_DESTROY, then the child window is destroyed as well.

DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.

Reply 1331 of 2397, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

There's no close button for the child, but the way forwarding is set up, SDL would take it as the same WM_CLOSE and send it as as a close event to DOSBox-X.

DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.

Reply 1332 of 2397, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

I added a log window to the async window code base and it would close but the main window wouldn't. I should test the debug window behavior, but I would like to look at the 3dfx lighting issue first. I was just verifying that these secondary windows close in the same way as before.

Reply 1333 of 2397, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

I reproduced the lighting issue in dosbox-x for the Trip demo. However, after running the demo on another client in 3dfx/gl mode, then I could no longer reproduce the issue. Attached is a picture for verification.

Attachments

  • trip-3dfx-gl-host-w10.png
    Filename
    trip-3dfx-gl-host-w10.png
    File size
    619.48 KiB
    Views
    745 views
    File comment
    Trip demo in 3dfx/gl mode on W10 host
    File license
    Fair use/fair dealing exception

Reply 1334 of 2397, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

So it happens randomly on your system? Seems consistent on mine.

DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.

Reply 1335 of 2397, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

Perhaps there's some initial OpenGL state that the demo or 3Dfx emulation doesn't account for?

DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.

Reply 1336 of 2397, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

That would be my first guess. There is definitely code in SDL12 and possibly in Windows, particularly in W10, that is optimizing the opengl mode switching. It may optimize it on color depth or another parameter, and this effects the opengl capabilities.

I was unable to reproduce that opengl lighting issue except for the first run in dosbox-x.

Maybe the user could reboot between modes. 😀

Reply 1337 of 2397, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

Is this patch helpful? I had it archived for a while, and it probably was from the SDL forums.

Fixed bug 1859 - No SDL_VIDEORESIZE event generated when the window manager sets the window size.

--- a/src/video/x11/SDL_x11image.c
+++ b/src/video/x11/SDL_x11image.c
@@ -59,7 +59,7 @@
shm_error = False;
X_handler = XSetErrorHandler(shm_errhandler);
XShmAttach(SDL_Display, &shminfo);
- XSync(SDL_Display, True);
+ XSync(SDL_Display, False);
XSetErrorHandler(X_handler);
if ( shm_error )
shmdt(shminfo.shmaddr);

Reply 1338 of 2397, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

That's a good one, yes.

Not a good idea to throw away X events during SHM pixmap setup. I'll apply it.

DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.

Reply 1339 of 2397, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

I also verified that SDL 1.2.13 and 1.2.15 differ in their behavior of how an application window returns following an alt+tab event (only tested with driver=windib). In 1.2.13, it will return as a window regardless of whether it was fullscreen before the alt+tab event. However, 1.2.15 will return the window as a fullscreen window with borders.

DOSBox-X is now able to handle a maximized window. However, would it be simple to change this behavior so a window returns as a non-maximized window following an alt+tab event?