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, 28 Nov 2015 13:22:44 -0700 (MST)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=telus.net; s=neo; t=1448742164; bh=Rzi/Ux26G8QEJZrpreieCfqpF3WM/FOO9AH5yB6+pBE=; h=Date:From:To:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=Xe2cOcEysUhI8zHIemWDO7qHcRkFQEheCvnGUs0UhbHasqwFvEC5/kI9ya51MOYnw sovg0pAQcumr7Qw2Gl3cJABKhjWST4/uyft0vLdVcefXauwDgyFlinRewhvCQ75CP9 iGTwzvA+VOY50msE3M9MED5mxgxEXZCzsEfo1NE9AMgiHAC/5jm1Lrn4cHp7cvAkRd X7eHo4ntN5o1TkYOhTiGAmG4mA6Q1wI8u/dSWT/de12PIW4NU++A2MnHVAPndxFH3O pwHE7v5xnSm+yodlswvZwEgpH9V08c7OhjsDwJX7h8XxWskbHoO5cU0nIaP4W4E7/h gEs/uFiA1RtGQ==
- Thread-index: UqE59+n+H/GRdho9PNHr6D9xWR3tsQ==
- Thread-topic: Feedback SDL2 support
----- Thomas Huth wrote:
> Am Fri, 23 Oct 2015 20:31:28 +0200
> schrieb Thomas Huth <th.huth@xxxxxx>:
>
> > Am Thu, 22 Oct 2015 06:11:45 -0600 (MDT)
> > schrieb David Savinkoff <dsavnkff@xxxxxxxxx>:
> > [...]
> > > > > > > Hi Thomas,
> > > > > > >
> > > > > > > Here is a patch that gets Fullsrceen/Windowed toggling (F11)
> > > > > > > to work significantly better on my CentOS 5 computer. The
> > > > > > > FULLSCREEN and BORDERLESS flags are necessary to fix
> > > > > > > two separate problems.
> > > > > > >
> > > > > > > Please try this patch on your system to investigate how
> > > > > > > things change for you.
> > > > > > >
> > > > > > > Thank You,
> > > > > > > David Savinkoff
> > >
> > > screen.c.2.diff is the best I can do tonight.
> >
> > Hi David,
> >
> > thanks for the testing! ... however, the SDL_WINDOW_FULLSCREEN_DESKTOP
> > has been used there on purpose - some people (especially Mac OS X
> > guys) wanted to have that feature with SDL2. But I think I could make
> > it optional, i.e. selectable with an option in the GUI. I'll try to
> > come up with a patch when I've got some spare time for this (but I
> > want to work on the 8-bit rendering removal first).
>
> Done, now it's possible to use resolution switching with SDL2 in
> fullscreen, too. Please have a look whether it is working as expected.
>
> Thomas
>
>
Hi Thomas,
There is a small error in your patch, which if corrected should
make my system work better.
Included is an attachment with further explanation.
Sincerely,
David Savinkoff
# HG changeset patch
# User Thomas Huth
# Date 1448716137 -3600
# Node ID 4838ccc01514292412865e04cbf03f1a9ff28011
# Parent df8f14e3558227903baa1b79427e45607a6c8c0a
Allow host screen resolution switching in SDL2 fullscreen mode, too
****************
sdlVideoFlags is overwritten when, possibly, it should be OR'd as in |=
see /**/ below
Note that I need sdlVideoFlags to ultimately be:
sdlVideoFlags = SDL_WINDOW_FULLSCREEN | SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_GRABBED;
I don't know if the MAC people want SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_GRABBED
However I don't think they want SDL_WINDOW_FULLSCREEN
****************
*** One Suggestion ***
diff -r df8f14e35582 -r 4838ccc01514 src/screen.c
--- a/src/screen.c Sat Nov 21 18:54:27 2015 +0100
+++ b/src/screen.c Sat Nov 28 14:08:57 2015 +0100
@@ -308,7 +308,11 @@
/* SDL Video attributes: */
if (bInFullScreen)
{
- sdlVideoFlags = SDL_WINDOW_FULLSCREEN_DESKTOP;
+ sdlVideoFlags = SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_GRABBED;
+ if (ConfigureParams.Screen.bKeepResolution)
+ /**/ sdlVideoFlags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
+ else
+ /**/ sdlVideoFlags |= SDL_WINDOW_FULLSCREEN;
}
else
{
*** Another Suggestion ***
diff -r df8f14e35582 -r 4838ccc01514 src/screen.c
--- a/src/screen.c Sat Nov 21 18:54:27 2015 +0100
+++ b/src/screen.c Sat Nov 28 14:08:57 2015 +0100
@@ -308,7 +308,10 @@
/* SDL Video attributes: */
if (bInFullScreen)
{
- sdlVideoFlags = SDL_WINDOW_FULLSCREEN_DESKTOP;
+ if (ConfigureParams.Screen.bKeepResolution)
+ sdlVideoFlags = SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_GRABBED;
+ else
+ sdlVideoFlags = SDL_WINDOW_FULLSCREEN | SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_GRABBED;
}
else
{