* (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
|
@ -58,4 +58,6 @@ www.rtsoft.com
|
|||
* Default color under status bar is now black, fixes issue when transparent colors are used in the stats area, random garbage would show through
|
||||
* (windows) Version # is now shown in title bar
|
||||
* (bugfix) Fixed some issues with how default offsets are calculated, it fixed some problems where sprites would be in the wrong place in certain DMODs
|
||||
* (bugfix, windows) "Smoothing" no longer incorrectly turns on if you lose/regain focus
|
||||
* (bugfix, windows) "Smoothing" no longer incorrectly turns on if you lose/regain focus
|
||||
* (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. It's a bit wacky how fullscreen/bordlerless fullscreen and clicking screen sizes works, but it usually gets you to where you want to go eventually
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
|
||||
#ifdef WINAPI
|
||||
|
||||
extern int g_winVideoScreenX;
|
||||
extern int g_winVideoScreenY;
|
||||
extern bool g_bUseBorderlessFullscreenOnWindows;
|
||||
|
||||
#include "StackWalker/StackUtils.h"
|
||||
extern bool g_bIsFullScreen;
|
||||
#endif
|
||||
|
@ -518,27 +522,33 @@ if (GetEmulatedPlatformID() == PLATFORM_ID_IOS)
|
|||
GetBaseApp()->m_sig_unloadSurfaces.connect(1, boost::bind(&App::OnUnloadSurfaces, this));
|
||||
|
||||
#ifdef WINAPI
|
||||
int videox = GetApp()->GetVarWithDefault("video_x", uint32(0))->GetUINT32();
|
||||
int videoy = GetApp()->GetVarWithDefault("video_y", uint32(0))->GetUINT32();
|
||||
int fullscreen = GetApp()->GetVarWithDefault("fullscreen", uint32(0))->GetUINT32();
|
||||
int videox = GetApp()->GetVarWithDefault("video_x", uint32(640))->GetUINT32();
|
||||
int videoy = GetApp()->GetVarWithDefault("video_y", uint32(480))->GetUINT32();
|
||||
int fullscreen = GetApp()->GetVarWithDefault("fullscreen", uint32(1))->GetUINT32();
|
||||
//bool borderlessfullscreen = GetApp()->GetVarWithDefault("fullscreen", uint32(1))->GetUINT32();
|
||||
|
||||
if (fullscreen)
|
||||
|
||||
if (fullscreen && g_bUseBorderlessFullscreenOnWindows)
|
||||
{
|
||||
LogMsg("Setting fullscreen...");
|
||||
//GetMessageManager()->SendGUI(MESSAGE_TYPE_GUI_TOGGLE_FULLSCREEN, 0, 0); //lParam holds a lot of random data about the press, look it up if
|
||||
|
||||
g_bIsFullScreen = false; //because we're using toggle..
|
||||
OnFullscreenToggleRequest();
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
if (videox != 0 && videoy != 0)
|
||||
{
|
||||
//remember old setup
|
||||
SetVideoMode(videox, videoy, false, 0);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -726,6 +736,8 @@ void App::OnScreenSizeChange()
|
|||
GetApp()->GetVar("fullscreen")->Set(uint32(g_bIsFullScreen));
|
||||
GetApp()->GetVar("videox")->Set(uint32(GetPrimaryGLX()));
|
||||
GetApp()->GetVar("videoy")->Set(uint32(GetPrimaryGLY()));
|
||||
//GetApp()->GetVarWithDefault("borderless_fullscreen", uint32(g_bUseBorderlessFullscreenOnWindows))->Set(uint32(0));
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -852,8 +864,7 @@ bool App::GetIconsOnLeft()
|
|||
#include "win/app/main.h"
|
||||
#endif
|
||||
|
||||
extern int g_winVideoScreenX;
|
||||
extern int g_winVideoScreenY;
|
||||
|
||||
|
||||
bool App::OnPreInitVideo()
|
||||
{
|
||||
|
@ -870,14 +881,18 @@ bool App::OnPreInitVideo()
|
|||
#ifdef RT_SCRIPT_BUILD
|
||||
|
||||
SetEmulatedPlatformID(PLATFORM_ID_WINDOWS);
|
||||
g_winVideoScreenX = 1024;
|
||||
g_winVideoScreenY = 768;
|
||||
g_winVideoScreenX = 640;
|
||||
g_winVideoScreenY = 480;
|
||||
|
||||
#endif
|
||||
|
||||
// g_winVideoScreenX = 800;
|
||||
// g_winVideoScreenY = 1280;
|
||||
|
||||
//windows only
|
||||
|
||||
|
||||
|
||||
VariantDB temp;
|
||||
temp.Load("save.dat");
|
||||
Variant *pVarX = temp.GetVarIfExists("videox");
|
||||
|
@ -887,8 +902,11 @@ bool App::OnPreInitVideo()
|
|||
|
||||
g_winVideoScreenX = pVarX->GetUINT32();
|
||||
g_winVideoScreenY = pVarY->GetUINT32();
|
||||
|
||||
g_bIsFullScreen = temp.GetVarWithDefault("fullscreen", uint32(1))->GetUINT32();
|
||||
g_bUseBorderlessFullscreenOnWindows = temp.GetVarWithDefault("borderless_fullscreen", uint32(0))->GetUINT32() != 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
return true;
|
||||
|
|
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