mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +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()
|
||||
: fullscreen(false)
|
||||
, fstype(Window::FULLSCREEN_TYPE_NORMAL)
|
||||
, fstype(Window::FULLSCREEN_TYPE_EXCLUSIVE)
|
||||
, vsync(true)
|
||||
, msaa(0)
|
||||
, 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[] =
|
||||
{
|
||||
{"normal", Window::FULLSCREEN_TYPE_NORMAL},
|
||||
{"exclusive", Window::FULLSCREEN_TYPE_EXCLUSIVE},
|
||||
{"desktop", Window::FULLSCREEN_TYPE_DESKTOP},
|
||||
};
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
enum FullscreenType
|
||||
{
|
||||
FULLSCREEN_TYPE_NORMAL,
|
||||
FULLSCREEN_TYPE_EXCLUSIVE,
|
||||
FULLSCREEN_TYPE_DESKTOP,
|
||||
FULLSCREEN_TYPE_MAX_ENUM
|
||||
};
|
||||
@@ -183,7 +183,7 @@ struct WindowSettings
|
||||
WindowSettings();
|
||||
|
||||
bool fullscreen; // = false
|
||||
Window::FullscreenType fstype; // = FULLSCREEN_TYPE_NORMAL
|
||||
Window::FullscreenType fstype; // = FULLSCREEN_TYPE_EXCLUSIVE
|
||||
bool vsync; // = true
|
||||
int msaa; // = 0
|
||||
bool resizable; // = false
|
||||
|
||||
@@ -357,7 +357,7 @@ void Window::updateSettings(const WindowSettings &newsettings)
|
||||
else if ((wflags & SDL_WINDOW_FULLSCREEN) == SDL_WINDOW_FULLSCREEN)
|
||||
{
|
||||
curMode.settings.fullscreen = true;
|
||||
curMode.settings.fstype = FULLSCREEN_TYPE_NORMAL;
|
||||
curMode.settings.fstype = FULLSCREEN_TYPE_EXCLUSIVE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -387,7 +387,7 @@ void Window::updateSettings(const WindowSettings &newsettings)
|
||||
|
||||
// Only minimize on focus loss if the window is in exclusive-fullscreen
|
||||
// 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");
|
||||
else
|
||||
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");
|
||||
|
||||
@@ -92,8 +92,8 @@ int w_setMode(lua_State *L)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Default to "normal" fullscreen.
|
||||
settings.fstype = Window::FULLSCREEN_TYPE_NORMAL;
|
||||
// Default to exclusive fullscreen mode.
|
||||
settings.fstype = Window::FULLSCREEN_TYPE_EXCLUSIVE;
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
@@ -129,7 +129,7 @@ int w_getMode(lua_State *L)
|
||||
|
||||
lua_newtable(L);
|
||||
|
||||
const char *fstypestr = "normal";
|
||||
const char *fstypestr = "exclusive";
|
||||
Window::getConstant(settings.fstype, fstypestr);
|
||||
|
||||
lua_pushstring(L, fstypestr);
|
||||
|
||||
@@ -304,7 +304,7 @@ function love.init()
|
||||
minwidth = 1,
|
||||
minheight = 1,
|
||||
fullscreen = false,
|
||||
fullscreentype = "normal",
|
||||
fullscreentype = "exclusive",
|
||||
display = 1,
|
||||
vsync = true,
|
||||
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,
|
||||
0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72,
|
||||
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,
|
||||
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,
|
||||
@@ -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,
|
||||
0x6c, 0x73, 0x65, 0x2c, 0x0a,
|
||||
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, 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,
|
||||
|
||||
Reference in New Issue
Block a user