fna-workbench

fna-workbench Commit Details


Date:2016-01-13 15:30:59 (9 years 7 months ago)
Author:Ethan Lee
Branch:master
Commit:ed33e421a7ba99fff009feaf398e9b96cbdc23b9
Parents: 673fafc0f3dcc3f05cfdd175944992f6b9509a38
Message:Reduce osxUseSpaces scope to RunLoop

Changes:

File differences

src/SDL2/SDL2_GamePlatform.cs
4040
4141
4242
43
44
45
46
47
48
4943
5044
5145
......
121115
122116
123117
124
125
126
127
128
129
130
131
132
133
134
135118
136119
137120
......
142125
143126
144127
128
129
130
131
132
133
134
135
136
137
138
139
145140
146141
147142
......
244239
245240
246241
247
242
248243
249244
250245
......
262257
263258
264259
265
260
266261
267262
268263
{
class SDL2_GamePlatform : GamePlatform
{
#region Private OSX-specific Variables
private bool INTERNAL_useFullscreenSpaces;
#endregion
#region Private DisplayMode Variables
private int displayIndex = 0;
// We hide the mouse cursor by default.
SDL.SDL_ShowCursor(0);
// OSX has some fancy fullscreen features, let's use them!
if (OSVersion.Equals("Mac OS X"))
{
hint = SDL.SDL_GetHint(SDL.SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES);
INTERNAL_useFullscreenSpaces = (String.IsNullOrEmpty(hint) || hint.Equals("1"));
}
else
{
INTERNAL_useFullscreenSpaces = false;
}
}
#endregion
{
SDL.SDL_ShowWindow(Game.Window.Handle);
// OSX has some fancy fullscreen features, let's use them!
bool osxUseSpaces;
if (OSVersion.Equals("Mac OS X"))
{
string hint = SDL.SDL_GetHint(SDL.SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES);
osxUseSpaces = (String.IsNullOrEmpty(hint) || hint.Equals("1"));
}
else
{
osxUseSpaces = false;
}
// Active Key List
List<Keys> keys = new List<Keys>();
{
Game.IsActive = true;
if (!INTERNAL_useFullscreenSpaces)
if (!osxUseSpaces)
{
// If we alt-tab away, we lose the 'fullscreen desktop' flag on some WMs
SDL.SDL_SetWindowFullscreen(
{
Game.IsActive = false;
if (!INTERNAL_useFullscreenSpaces)
if (!osxUseSpaces)
{
SDL.SDL_SetWindowFullscreen(Game.Window.Handle, 0);
}

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.53025s using 13 queries.