CFrame: Add fullscreen window styles to enable exclusive mode in OpenGL.
This is not implemented within the backend, but relies purely on driver heuristics.
This commit is contained in:
parent
0bcebd81f6
commit
857c116210
|
@ -192,6 +192,25 @@ WXLRESULT CRenderFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPa
|
|||
}
|
||||
#endif
|
||||
|
||||
bool CRenderFrame::ShowFullScreen(bool show, long style)
|
||||
{
|
||||
if (show)
|
||||
{
|
||||
// OpenGL requires the pop-up style to activate exclusive mode.
|
||||
SetWindowStyle((GetWindowStyle() & ~wxDEFAULT_FRAME_STYLE) | wxPOPUP_WINDOW);
|
||||
}
|
||||
|
||||
bool result = wxTopLevelWindow::ShowFullScreen(show, style);
|
||||
|
||||
if (!show)
|
||||
{
|
||||
// Restore the default style.
|
||||
SetWindowStyle((GetWindowStyle() & ~wxPOPUP_WINDOW) | wxDEFAULT_FRAME_STYLE);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// event tables
|
||||
// Notice that wxID_HELP will be processed for the 'About' menu and the toolbar
|
||||
// help button.
|
||||
|
|
|
@ -60,6 +60,8 @@ class CRenderFrame : public wxFrame
|
|||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE);
|
||||
|
||||
bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL) override;
|
||||
|
||||
private:
|
||||
void OnDropFiles(wxDropFilesEvent& event);
|
||||
static bool IsValidSavestateDropped(const std::string& filepath);
|
||||
|
|
Loading…
Reference in New Issue