* (windows) Added "Windowed Borderless fullscreen mode" toggle, defaults to off. It will try to do 640X480 at your native monitor resolution by default now on
a clean install. If you've dragged the dink window to a weird size it won't be able to go fullscreen which is kind of weird, but it does give a clear error message. It should probably enumerate graphic modes and choose one if the current one is invalid, or let the user choose, meh (requires proton branch update too) git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1479 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
parent
f9d131f431
commit
72d2a12be6
4 changed files with 574 additions and 494 deletions
File diff suppressed because it is too large
Load diff
|
@ -14,6 +14,10 @@
|
|||
#include "Gamepad/GamepadProvider60Beat.h"
|
||||
#endif
|
||||
|
||||
#ifdef WINAPI
|
||||
extern bool g_bUseBorderlessFullscreenOnWindows;
|
||||
extern bool g_bIsFullScreen;
|
||||
#endif
|
||||
#include "Gamepad/GamepadProvideriCade.h"
|
||||
|
||||
void UpdateOptionsGUI();
|
||||
|
@ -58,6 +62,12 @@ void OptionsMenuOnSelect(VariantList *pVList) //0=vec2 point of click, 1=entity
|
|||
GetBaseApp()->SetVideoMode(1280, 960, false);
|
||||
}
|
||||
|
||||
if (pEntClicked->GetName() == "vid_hd")
|
||||
{
|
||||
GetBaseApp()->SetVideoMode(1920, 1080, false);
|
||||
}
|
||||
|
||||
|
||||
if (pEntClicked->GetName() == "controls_0")
|
||||
{
|
||||
GetApp()->GetShared()->GetVar("controlStyle")->Set(uint32(CONTROLS_JOYPAD));
|
||||
|
@ -124,6 +134,49 @@ void OptionsMenuOnSelect(VariantList *pVList) //0=vec2 point of click, 1=entity
|
|||
DinkOnForeground();
|
||||
}
|
||||
|
||||
#ifdef WINAPI
|
||||
if (pEntClicked->GetName() == "check_borderless")
|
||||
{
|
||||
bool bChecked = IsCheckboxChecked(pEntClicked);
|
||||
GetApp()->GetVar("borderless_fullscreen")->Set(uint32(bChecked));
|
||||
|
||||
if (g_bIsFullScreen)
|
||||
{
|
||||
if (!g_bUseBorderlessFullscreenOnWindows)
|
||||
{
|
||||
g_bUseBorderlessFullscreenOnWindows = bChecked;
|
||||
ChangeDisplaySettings(NULL, 0);
|
||||
//GetBaseApp()->SetVideoMode(640, 480, false);
|
||||
g_bIsFullScreen = false;
|
||||
GetBaseApp()->OnFullscreenToggleRequest();
|
||||
}
|
||||
else
|
||||
{
|
||||
//we're currently borderless.. how to we remove that?
|
||||
g_bUseBorderlessFullscreenOnWindows = bChecked;
|
||||
GetBaseApp()->SetVideoMode(640, 480, true);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
g_bUseBorderlessFullscreenOnWindows = bChecked;
|
||||
|
||||
/*
|
||||
GetApp()->UpdateVideoSettings();
|
||||
DinkUnloadUnusedGraphicsByUsageTime(0); //unload anything not used in the last second
|
||||
DinkReInitSurfacesAfterVideoChange();
|
||||
DinkOnForeground();
|
||||
*/
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (pEntClicked->GetName() == "sbeat_ad")
|
||||
{
|
||||
string url = "http://www.60beat.com/?Click=326";
|
||||
|
@ -401,6 +454,13 @@ void OptionsMenuAddScrollContent(Entity *pParent)
|
|||
y += GetSize2DEntity(pEnt).y;
|
||||
y += spacerY;
|
||||
|
||||
#ifdef WINAPI
|
||||
bool bBorderlessFullscreen = GetApp()->GetVar("borderless_fullscreen")->GetUINT32() != 0;
|
||||
pEnt = CreateCheckbox(pBG, "check_borderless", "Use Windowed borderless fullscreen mode", startX, y, bBorderlessFullscreen, FONT_SMALL, 1.0f);
|
||||
pEnt->GetFunction("OnButtonSelected")->sig_function.connect(&OptionsMenuOnSelect);
|
||||
y += GetSize2DEntity(pEnt).y;
|
||||
y += spacerY;
|
||||
#endif
|
||||
|
||||
|
||||
//fps limit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue