Skip to content

Instantly share code, notes, and snippets.

@comet0
Created March 30, 2017 19:51
Show Gist options
  • Save comet0/d7ce79e8f91e2493017151c0381019f7 to your computer and use it in GitHub Desktop.
Save comet0/d7ce79e8f91e2493017151c0381019f7 to your computer and use it in GitHub Desktop.
--- a/rpcs3/Emu/RSX/RSXThread.cpp
+++ b/rpcs3/Emu/RSX/RSXThread.cpp
@@ -25,6 +25,7 @@ cfg::bool_entry g_cfg_rsx_read_color_buffers(cfg::root.video, "Read Color Buffer
cfg::bool_entry g_cfg_rsx_read_depth_buffer(cfg::root.video, "Read Depth Buffer");
cfg::bool_entry g_cfg_rsx_log_programs(cfg::root.video, "Log shader programs");
cfg::bool_entry g_cfg_rsx_vsync(cfg::root.video, "VSync");
+cfg::bool_entry g_cfg_rsx_start_fullscreen(cfg::root.video, "Start Fullscreen");
cfg::bool_entry g_cfg_rsx_debug_output(cfg::root.video, "Debug output");
cfg::bool_entry g_cfg_rsx_overlay(cfg::root.video, "Debug overlay");
cfg::bool_entry g_cfg_rsx_gl_legacy_buffers(cfg::root.video, "Use Legacy OpenGL Buffers (Debug)");
diff --git a/rpcs3/Gui/GSFrame.cpp b/rpcs3/Gui/GSFrame.cpp
index 73d35d7..136b060 100644
--- a/rpcs3/Gui/GSFrame.cpp
+++ b/rpcs3/Gui/GSFrame.cpp
@@ -2,6 +2,7 @@
#include "stdafx_gui.h"
#include "Utilities/Timer.h"
+#include "Utilities/Config.h"
#include "Emu/System.h"
#include "rpcs3.h"
diff --git a/rpcs3/Gui/SettingsDialog.cpp b/rpcs3/Gui/SettingsDialog.cpp
index 51e648f..1293fad 100644
--- a/rpcs3/Gui/SettingsDialog.cpp
+++ b/rpcs3/Gui/SettingsDialog.cpp
@@ -319,6 +319,7 @@ SettingsDialog::SettingsDialog(wxWindow* parent, const std::string& path)
wxCheckBox* chbox_gs_read_color = new wxCheckBox(p_graphics, wxID_ANY, "Read Color Buffers");
wxCheckBox* chbox_gs_read_depth = new wxCheckBox(p_graphics, wxID_ANY, "Read Depth Buffer");
wxCheckBox* chbox_gs_vsync = new wxCheckBox(p_graphics, wxID_ANY, "VSync");
+ wxCheckBox* chbox_gs_start_fullscreen = new wxCheckBox(p_graphics, wxID_ANY, "Start Fullscreen");
wxCheckBox* chbox_gs_debug_output = new wxCheckBox(p_graphics, wxID_ANY, "Debug Output");
wxCheckBox* chbox_gs_overlay = new wxCheckBox(p_graphics, wxID_ANY, "Debug Overlay");
wxCheckBox* chbox_gs_gl_legacy_buffers = new wxCheckBox(p_graphics, wxID_ANY, "Use Legacy OpenGL Buffers");
@@ -396,6 +397,7 @@ SettingsDialog::SettingsDialog(wxWindow* parent, const std::string& path)
pads.emplace_back(std::make_unique<checkbox_pad>(cfg_location{ "Video", "Read Color Buffers" }, chbox_gs_read_color));
pads.emplace_back(std::make_unique<checkbox_pad>(cfg_location{ "Video", "Read Depth Buffer" }, chbox_gs_read_depth));
pads.emplace_back(std::make_unique<checkbox_pad>(cfg_location{ "Video", "VSync" }, chbox_gs_vsync));
+ pads.emplace_back(std::make_unique<checkbox_pad>(cfg_location{ "Video", "Start Fullscreen" }, chbox_gs_start_fullscreen));
pads.emplace_back(std::make_unique<checkbox_pad>(cfg_location{ "Video", "Debug output" }, chbox_gs_debug_output));
pads.emplace_back(std::make_unique<checkbox_pad>(cfg_location{ "Video", "Debug overlay" }, chbox_gs_overlay));
pads.emplace_back(std::make_unique<checkbox_pad>(cfg_location{ "Video", "Use Legacy OpenGL Buffers (Debug)" }, chbox_gs_gl_legacy_buffers));
@@ -495,6 +497,7 @@ SettingsDialog::SettingsDialog(wxWindow* parent, const std::string& path)
s_subpanel_graphics2->Add(chbox_gs_overlay, wxSizerFlags().Border(wxALL, 5).Expand());
s_subpanel_graphics2->Add(chbox_gs_log_prog, wxSizerFlags().Border(wxALL, 5).Expand());
s_subpanel_graphics2->Add(chbox_gs_vsync, wxSizerFlags().Border(wxALL, 5).Expand());
+ s_subpanel_graphics2->Add(chbox_gs_start_fullscreen, wxSizerFlags().Border(wxALL, 5).Expand());
s_subpanel_graphics->Add(s_subpanel_graphics1);
s_subpanel_graphics->Add(s_subpanel_graphics2);
//##### Wrong place, caused crash upon booting game
@@ -12,6 +13,8 @@ BEGIN_EVENT_TABLE(GSFrame, wxFrame)
EVT_SIZE(GSFrame::OnSize)
END_EVENT_TABLE()
+extern cfg::bool_entry g_cfg_rsx_start_fullscreen;
+
GSFrame::GSFrame(const wxString& title, int w, int h)
: wxFrame(nullptr, wxID_ANY, "GSFrame[" + title + "]")
{
@@ -22,6 +25,9 @@ GSFrame::GSFrame(const wxString& title, int w, int h)
wxGetApp().Bind(wxEVT_KEY_DOWN, &GSFrame::OnKeyDown, this);
Bind(wxEVT_CLOSE_WINDOW, &GSFrame::OnClose, this);
Bind(wxEVT_LEFT_DCLICK, &GSFrame::OnLeftDclick, this);
+
+ if (g_cfg_rsx_start_fullscreen)
+ ShowFullScreen(true);
}
void GSFrame::OnPaint(wxPaintEvent& event)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment