Re: [hatari-devel] Feedback SDL2 support |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Feedback SDL2 support
- From: David Savinkoff <dsavnkff@xxxxxxxxx>
- Date: Sat, 12 Dec 2015 18:54:18 -0700 (MST)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=telus.net; s=neo; t=1449971658; bh=J3SUJ/4tk6RrWuVWTaEZJEGogfJ2jEKaXCxhCsp+X80=; h=Date:From:To:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type:Content-Transfer-Encoding; b=Dn+A6Zs224Ww/h/qSMClaUdXChh7cicC0xbuWpwRXigkW1RiO1HKq7FEdRERehIhb /R1OHr5DEFQl3I7M3MK3J9VCPdAu5b+IHEGyMs9rcNkVQY54tZRcxGOvZQ5PVLEO3/ XOQP+5RtHY5wQvhvfeltr8M4rmJB/Tafyhk08nzZAipIj8zAWRDpETChjaFud8r1xF 0fGUa7alzW5m4AjEle+kqKXw3uGU7wW7j1O0Mn5ceSa9VQ0ImXSHRkv9uaFiz1O4wQ v50LSbYMMA9hAFsfuL936Wge8+YAobzKLmQ4/6YMBfDzYaV4sNJUGdP93jQsHh3uXS j0jN1ibwDit9Q==
- Thread-index: bXntoZMYcvc2RgHWjWBQZ4kUFQyUEUhruYg6
- Thread-topic: Feedback SDL2 support
----- 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.