mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Renamed the fullscreen type "normal" to "exclusive".
--HG-- branch : minor
This commit is contained in:
@@ -40,7 +40,7 @@ void Window::swapBuffers()
|
|||||||
|
|
||||||
WindowSettings::WindowSettings()
|
WindowSettings::WindowSettings()
|
||||||
: fullscreen(false)
|
: fullscreen(false)
|
||||||
, fstype(Window::FULLSCREEN_TYPE_NORMAL)
|
, fstype(Window::FULLSCREEN_TYPE_EXCLUSIVE)
|
||||||
, vsync(true)
|
, vsync(true)
|
||||||
, msaa(0)
|
, msaa(0)
|
||||||
, resizable(false)
|
, resizable(false)
|
||||||
@@ -104,7 +104,7 @@ StringMap<Window::Setting, Window::SETTING_MAX_ENUM> Window::settings(Window::se
|
|||||||
|
|
||||||
StringMap<Window::FullscreenType, Window::FULLSCREEN_TYPE_MAX_ENUM>::Entry Window::fullscreenTypeEntries[] =
|
StringMap<Window::FullscreenType, Window::FULLSCREEN_TYPE_MAX_ENUM>::Entry Window::fullscreenTypeEntries[] =
|
||||||
{
|
{
|
||||||
{"normal", Window::FULLSCREEN_TYPE_NORMAL},
|
{"exclusive", Window::FULLSCREEN_TYPE_EXCLUSIVE},
|
||||||
{"desktop", Window::FULLSCREEN_TYPE_DESKTOP},
|
{"desktop", Window::FULLSCREEN_TYPE_DESKTOP},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
|
|
||||||
enum FullscreenType
|
enum FullscreenType
|
||||||
{
|
{
|
||||||
FULLSCREEN_TYPE_NORMAL,
|
FULLSCREEN_TYPE_EXCLUSIVE,
|
||||||
FULLSCREEN_TYPE_DESKTOP,
|
FULLSCREEN_TYPE_DESKTOP,
|
||||||
FULLSCREEN_TYPE_MAX_ENUM
|
FULLSCREEN_TYPE_MAX_ENUM
|
||||||
};
|
};
|
||||||
@@ -183,7 +183,7 @@ struct WindowSettings
|
|||||||
WindowSettings();
|
WindowSettings();
|
||||||
|
|
||||||
bool fullscreen; // = false
|
bool fullscreen; // = false
|
||||||
Window::FullscreenType fstype; // = FULLSCREEN_TYPE_NORMAL
|
Window::FullscreenType fstype; // = FULLSCREEN_TYPE_EXCLUSIVE
|
||||||
bool vsync; // = true
|
bool vsync; // = true
|
||||||
int msaa; // = 0
|
int msaa; // = 0
|
||||||
bool resizable; // = false
|
bool resizable; // = false
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ void Window::updateSettings(const WindowSettings &newsettings)
|
|||||||
else if ((wflags & SDL_WINDOW_FULLSCREEN) == SDL_WINDOW_FULLSCREEN)
|
else if ((wflags & SDL_WINDOW_FULLSCREEN) == SDL_WINDOW_FULLSCREEN)
|
||||||
{
|
{
|
||||||
curMode.settings.fullscreen = true;
|
curMode.settings.fullscreen = true;
|
||||||
curMode.settings.fstype = FULLSCREEN_TYPE_NORMAL;
|
curMode.settings.fstype = FULLSCREEN_TYPE_EXCLUSIVE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -387,7 +387,7 @@ void Window::updateSettings(const WindowSettings &newsettings)
|
|||||||
|
|
||||||
// Only minimize on focus loss if the window is in exclusive-fullscreen
|
// Only minimize on focus loss if the window is in exclusive-fullscreen
|
||||||
// mode.
|
// mode.
|
||||||
if (curMode.settings.fullscreen && curMode.settings.fstype == FULLSCREEN_TYPE_NORMAL)
|
if (curMode.settings.fullscreen && curMode.settings.fstype == FULLSCREEN_TYPE_EXCLUSIVE)
|
||||||
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "1");
|
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "1");
|
||||||
else
|
else
|
||||||
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");
|
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");
|
||||||
|
|||||||
@@ -92,8 +92,8 @@ int w_setMode(lua_State *L)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Default to "normal" fullscreen.
|
// Default to exclusive fullscreen mode.
|
||||||
settings.fstype = Window::FULLSCREEN_TYPE_NORMAL;
|
settings.fstype = Window::FULLSCREEN_TYPE_EXCLUSIVE;
|
||||||
}
|
}
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ int w_getMode(lua_State *L)
|
|||||||
|
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
|
|
||||||
const char *fstypestr = "normal";
|
const char *fstypestr = "exclusive";
|
||||||
Window::getConstant(settings.fstype, fstypestr);
|
Window::getConstant(settings.fstype, fstypestr);
|
||||||
|
|
||||||
lua_pushstring(L, fstypestr);
|
lua_pushstring(L, fstypestr);
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ function love.init()
|
|||||||
minwidth = 1,
|
minwidth = 1,
|
||||||
minheight = 1,
|
minheight = 1,
|
||||||
fullscreen = false,
|
fullscreen = false,
|
||||||
fullscreentype = "normal",
|
fullscreentype = "exclusive",
|
||||||
display = 1,
|
display = 1,
|
||||||
vsync = true,
|
vsync = true,
|
||||||
msaa = 0,
|
msaa = 0,
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const unsigned char boot_lua[] =
|
|||||||
0x61, 0x72, 0x69, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75,
|
0x61, 0x72, 0x69, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75,
|
||||||
0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72,
|
0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72,
|
||||||
0x65, 0x2e, 0x0a,
|
0x65, 0x2e, 0x0a,
|
||||||
0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x67, 0x72, 0x61, 0x6e,
|
0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x67, 0x72, 0x61, 0x6e,
|
||||||
0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x79, 0x6f, 0x6e, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x75,
|
0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x79, 0x6f, 0x6e, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x75,
|
||||||
0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x66,
|
0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x66,
|
||||||
0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x2c, 0x0a,
|
0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x2c, 0x0a,
|
||||||
@@ -556,7 +556,7 @@ const unsigned char boot_lua[] =
|
|||||||
0x09, 0x09, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x61,
|
0x09, 0x09, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x61,
|
||||||
0x6c, 0x73, 0x65, 0x2c, 0x0a,
|
0x6c, 0x73, 0x65, 0x2c, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x20,
|
0x09, 0x09, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x20,
|
||||||
0x3d, 0x20, 0x22, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x22, 0x2c, 0x0a,
|
0x3d, 0x20, 0x22, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x22, 0x2c, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x20, 0x3d, 0x20, 0x31, 0x2c, 0x0a,
|
0x09, 0x09, 0x09, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x20, 0x3d, 0x20, 0x31, 0x2c, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x76, 0x73, 0x79, 0x6e, 0x63, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x0a,
|
0x09, 0x09, 0x09, 0x76, 0x73, 0x79, 0x6e, 0x63, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x6d, 0x73, 0x61, 0x61, 0x20, 0x3d, 0x20, 0x30, 0x2c, 0x0a,
|
0x09, 0x09, 0x09, 0x6d, 0x73, 0x61, 0x61, 0x20, 0x3d, 0x20, 0x30, 0x2c, 0x0a,
|
||||||
|
|||||||
Reference in New Issue
Block a user