Re: [hatari-devel] Feedback SDL2 support

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


----- David Savinkoff wrote:
> ----- Thomas Huth wrote:
> > Am Mon, 30 Nov 2015 01:15:53 -0700 (MST)
> > schrieb David Savinkoff:
> > > 
> > > "Keep desktop resolution - Selected" still has a problem of losing
> > > window focus on my system. I think SDL2 events become misdirected
> > > to hatari's parent process (or whatever window the cursor is over when
> > > F11 is pressed) instead of hatari... I noticed that typed keystrokes
> > > start showing up in the terminal window where hatari was launched
> > > after window focus is lost.
> > 
> > That's odd. It works fine for on my system. Anyway, could you please
> > try these two things independently, to see whether they cure this issue:
> > 
> > 1)
> > 
> > Locate this code sequence in screen.c:
> > 
> > 	if (sdlWindow)
> > 	{
> > 		SDL_SetWindowSize(sdlWindow, width, height);
> > 	}
> > 	else
> > 	{
> > 		sdlWindow = SDL_CreateWindow("Hatari", SDL_WINDOWPOS_UNDEFINED,
> > 		                             SDL_WINDOWPOS_UNDEFINED,
> > 		                             width, height, sdlVideoFlags);
> > 	}
> > 
> > And replace it with this:
> > 
> > 	if (sdlWindow)
> > 	{
> > 		SDL_SetWindowSize(sdlWindow, bInFullScreen ? WWWW : width,
> >                                              bInFullScreen ? HHHH : height);
> > 	}
> > 	else
> > 	{
> > 		sdlWindow = SDL_CreateWindow("Hatari", SDL_WINDOWPOS_UNDEFINED,
> > 		                             SDL_WINDOWPOS_UNDEFINED,
> > 		                             bInFullScreen ? WWWW : width,
> >                                              bInFullScreen ? HHHH : height,
> >                                              sdlVideoFlags);
> > 	}
> > 
> > ... where WWWW is the width of your host screen and HHHH the height
> > (i.e. fill in your desktop resolution values).
> > 
> > 
> > 2) If the first experiment does not help, please try to add a 
> > 
> > 	SDL_RaiseWindow(sdlWindow);
> > 
> > at the end of the Screen_SetSDLVideoSize() function.
> > 
> >  Thomas
> > 
> > 
> 
> The first experiment did not help, and doesn't seem to be the issue
> because the monitor indicated the resolutions correctly.
> 
> The second experiment Did Help, but some problems still remain.
> Sometimes the focus is on the wrong window, and sometimes
> the fullscreen window is minimized (sometimes I can unminimize
> it from the taskbar). And sometimes things actually work!
> 
> I Hope that helps.
> 
> 

Hi Thomas,

1)
I just compiled and tested the latest Hatari with SDL2 window
resize/scaling on my old pentium4/Centos5, and it works
wonderfully.

2)
Fullscreen Resolution changing works well (as always).

3)
Keep Fullscreen Resolution works poorly as before.

This leads me to think that there is a conflict between
Atari resolutions and actual desktop resolutions in
"Keep Fullscreen Resolution" mode; because I can
make the window fullscreen in (1) without problems.

As an example, I choose 416x312 in the SDL menu and
can drag the window to any size including fullscreen.
(The SDL menu is in low-res mode too) -- good

When I use "Keep Fullscreen Resolution" mode, the
SDL menu is in high-res mode AND my 416x312 is
not respected. (There must be some combination of
resolution possibilities etc. that is not considered)
-- bad

Thus, if (1) is used to replace (3) all is well.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/