diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra/emu_window/emu_window_glfw.cpp | 7 | ||||
| -rw-r--r-- | src/citra_qt/bootmanager.cpp | 11 | ||||
| -rw-r--r-- | src/citra_qt/main.cpp | 3 | ||||
| -rw-r--r-- | src/common/emu_window.h | 17 |
4 files changed, 10 insertions, 28 deletions
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp index 7e1e1c9a6..9e6f91578 100644 --- a/src/citra/emu_window/emu_window_glfw.cpp +++ b/src/citra/emu_window/emu_window_glfw.cpp | |||
| @@ -75,9 +75,10 @@ EmuWindow_GLFW::EmuWindow_GLFW() { | |||
| 75 | glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); | 75 | glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); |
| 76 | glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); | 76 | glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); |
| 77 | 77 | ||
| 78 | m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth, | 78 | std::string window_title = Common::StringFromFormat("Citra | %s-%s", Common::g_scm_branch, Common::g_scm_desc); |
| 79 | (VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight), | 79 | m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth, |
| 80 | GetWindowTitle().c_str(), NULL, NULL); | 80 | (VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight), |
| 81 | window_title.c_str(), NULL, NULL); | ||
| 81 | 82 | ||
| 82 | if (m_render_window == NULL) { | 83 | if (m_render_window == NULL) { |
| 83 | printf("Failed to create GLFW window! Exiting..."); | 84 | printf("Failed to create GLFW window! Exiting..."); |
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index 8c12cb228..ace48a237 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp | |||
| @@ -111,6 +111,9 @@ EmuThread& GRenderWindow::GetEmuThread() | |||
| 111 | 111 | ||
| 112 | GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this), keyboard_id(0) | 112 | GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this), keyboard_id(0) |
| 113 | { | 113 | { |
| 114 | std::string window_title = Common::StringFromFormat("Citra | %s-%s", Common::g_scm_branch, Common::g_scm_desc); | ||
| 115 | setWindowTitle(QString::fromStdString(window_title)); | ||
| 116 | |||
| 114 | keyboard_id = KeyMap::NewDeviceId(); | 117 | keyboard_id = KeyMap::NewDeviceId(); |
| 115 | ReloadSetKeymaps(); | 118 | ReloadSetKeymaps(); |
| 116 | 119 | ||
| @@ -182,14 +185,6 @@ void GRenderWindow::DoneCurrent() | |||
| 182 | } | 185 | } |
| 183 | 186 | ||
| 184 | void GRenderWindow::PollEvents() { | 187 | void GRenderWindow::PollEvents() { |
| 185 | // TODO(ShizZy): Does this belong here? This is a reasonable place to update the window title | ||
| 186 | // from the main thread, but this should probably be in an event handler... | ||
| 187 | /* | ||
| 188 | static char title[128]; | ||
| 189 | sprintf(title, "%s (FPS: %02.02f)", window_title_.c_str(), | ||
| 190 | video_core::g_renderer->current_fps()); | ||
| 191 | setWindowTitle(title); | ||
| 192 | */ | ||
| 193 | } | 188 | } |
| 194 | 189 | ||
| 195 | // On Qt 5.0+, this correctly gets the size of the framebuffer (pixels). | 190 | // On Qt 5.0+, this correctly gets the size of the framebuffer (pixels). |
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 9a4e36adf..d5554d917 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp | |||
| @@ -117,7 +117,8 @@ GMainWindow::GMainWindow() | |||
| 117 | connect(GetHotkey("Main Window", "Load File", this), SIGNAL(activated()), this, SLOT(OnMenuLoadFile())); | 117 | connect(GetHotkey("Main Window", "Load File", this), SIGNAL(activated()), this, SLOT(OnMenuLoadFile())); |
| 118 | connect(GetHotkey("Main Window", "Start Emulation", this), SIGNAL(activated()), this, SLOT(OnStartGame())); | 118 | connect(GetHotkey("Main Window", "Start Emulation", this), SIGNAL(activated()), this, SLOT(OnStartGame())); |
| 119 | 119 | ||
| 120 | setWindowTitle(render_window->GetWindowTitle().c_str()); | 120 | std::string window_title = Common::StringFromFormat("Citra | %s-%s", Common::g_scm_branch, Common::g_scm_desc); |
| 121 | setWindowTitle(window_title.c_str()); | ||
| 121 | 122 | ||
| 122 | show(); | 123 | show(); |
| 123 | 124 | ||
diff --git a/src/common/emu_window.h b/src/common/emu_window.h index 1465743f2..3817a7734 100644 --- a/src/common/emu_window.h +++ b/src/common/emu_window.h | |||
| @@ -89,20 +89,8 @@ public: | |||
| 89 | return std::make_pair(client_area_width, client_area_height); | 89 | return std::make_pair(client_area_width, client_area_height); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | // TODO: Remove | ||
| 93 | std::string GetWindowTitle() const { | ||
| 94 | return window_title; | ||
| 95 | } | ||
| 96 | |||
| 97 | // TODO: Remove | ||
| 98 | void SetWindowTitle(const std::string& val) { | ||
| 99 | window_title = val; | ||
| 100 | } | ||
| 101 | |||
| 102 | protected: | 92 | protected: |
| 103 | // TODO: Remove window title initialization | 93 | EmuWindow() |
| 104 | EmuWindow() : | ||
| 105 | window_title(Common::StringFromFormat("Citra | %s-%s", Common::g_scm_branch, Common::g_scm_desc)) | ||
| 106 | { | 94 | { |
| 107 | // TODO | 95 | // TODO |
| 108 | config.min_client_area_size = std::make_pair(300u, 500u); | 96 | config.min_client_area_size = std::make_pair(300u, 500u); |
| @@ -145,9 +133,6 @@ private: | |||
| 145 | virtual void OnMinimalClientAreaChangeRequest(const std::pair<unsigned,unsigned>& minimal_size) { | 133 | virtual void OnMinimalClientAreaChangeRequest(const std::pair<unsigned,unsigned>& minimal_size) { |
| 146 | } | 134 | } |
| 147 | 135 | ||
| 148 | // TODO: Remove | ||
| 149 | std::string window_title; ///< Current window title, should be used by window impl. | ||
| 150 | |||
| 151 | std::pair<unsigned,unsigned> framebuffer_size; | 136 | std::pair<unsigned,unsigned> framebuffer_size; |
| 152 | 137 | ||
| 153 | unsigned client_area_width; ///< Current client width, should be set by window impl. | 138 | unsigned client_area_width; ///< Current client width, should be set by window impl. |