summaryrefslogtreecommitdiff
path: root/src/citra
diff options
context:
space:
mode:
authorGravatar bunnei2014-04-08 23:18:23 -0400
committerGravatar bunnei2014-04-08 23:18:23 -0400
commit5da03e821ef281909e65c3df33f67596074ae98a (patch)
tree15f1bb0f91a88082a21e4e2e4531e1f8dee026bf /src/citra
parentfixed licensing and updated code style naming for arm_interface/arm_interpret... (diff)
downloadyuzu-5da03e821ef281909e65c3df33f67596074ae98a.tar.gz
yuzu-5da03e821ef281909e65c3df33f67596074ae98a.tar.xz
yuzu-5da03e821ef281909e65c3df33f67596074ae98a.zip
- removed deprecated version.h
- cleaned up window title - cleaned up emu_window_glfw/emu_window
Diffstat (limited to 'src/citra')
-rw-r--r--src/citra/citra.h12
-rw-r--r--src/citra/citra.vcxproj1
-rw-r--r--src/citra/citra.vcxproj.filters1
-rw-r--r--src/citra/emu_window/emu_window_glfw.cpp30
-rw-r--r--src/citra/emu_window/emu_window_glfw.h2
-rw-r--r--src/citra/version.h6
6 files changed, 22 insertions, 30 deletions
diff --git a/src/citra/citra.h b/src/citra/citra.h
index 5a2c60aac..b9254c5da 100644
--- a/src/citra/citra.h
+++ b/src/citra/citra.h
@@ -4,10 +4,12 @@
4 4
5#pragma once 5#pragma once
6 6
7#include "version.h" 7#include <string>
8 8
9#define APP_NAME "citra" 9#include "common/common.h"
10#define APP_VERSION "0.01-" VERSION 10
11#define APP_TITLE APP_NAME " " APP_VERSION 11#define APP_NAME std::string("citra")
12#define COPYRIGHT "Copyright (C) 2013 Citra Emulator" 12#define APP_VERSION std::string("0.01-") + std::string(g_scm_rev_str)
13#define APP_TITLE (APP_NAME + " " + APP_VERSION)
14#define COPYRIGHT "Copyright (C) 2014 Citra Emulator"
13 15
diff --git a/src/citra/citra.vcxproj b/src/citra/citra.vcxproj
index 4ea222fcd..d81ac5bfc 100644
--- a/src/citra/citra.vcxproj
+++ b/src/citra/citra.vcxproj
@@ -206,7 +206,6 @@
206 <ClInclude Include="citra.h" /> 206 <ClInclude Include="citra.h" />
207 <ClInclude Include="emu_window\emu_window_glfw.h" /> 207 <ClInclude Include="emu_window\emu_window_glfw.h" />
208 <ClInclude Include="resource.h" /> 208 <ClInclude Include="resource.h" />
209 <ClInclude Include="version.h" />
210 </ItemGroup> 209 </ItemGroup>
211 <ItemGroup> 210 <ItemGroup>
212 <Text Include="CMakeLists.txt" /> 211 <Text Include="CMakeLists.txt" />
diff --git a/src/citra/citra.vcxproj.filters b/src/citra/citra.vcxproj.filters
index b41cdf146..b2685691f 100644
--- a/src/citra/citra.vcxproj.filters
+++ b/src/citra/citra.vcxproj.filters
@@ -14,7 +14,6 @@
14 <ItemGroup> 14 <ItemGroup>
15 <ClInclude Include="citra.h" /> 15 <ClInclude Include="citra.h" />
16 <ClInclude Include="resource.h" /> 16 <ClInclude Include="resource.h" />
17 <ClInclude Include="version.h" />
18 <ClInclude Include="emu_window\emu_window_glfw.h"> 17 <ClInclude Include="emu_window\emu_window_glfw.h">
19 <Filter>emu_window</Filter> 18 <Filter>emu_window</Filter>
20 </ClInclude> 19 </ClInclude>
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp
index 442176d91..e6943f146 100644
--- a/src/citra/emu_window/emu_window_glfw.cpp
+++ b/src/citra/emu_window/emu_window_glfw.cpp
@@ -3,7 +3,10 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "common/common.h" 5#include "common/common.h"
6
6#include "video_core/video_core.h" 7#include "video_core/video_core.h"
8
9#include "citra/citra.h"
7#include "citra/emu_window/emu_window_glfw.h" 10#include "citra/emu_window/emu_window_glfw.h"
8 11
9static void OnKeyEvent(GLFWwindow* win, int key, int action) { 12static void OnKeyEvent(GLFWwindow* win, int key, int action) {
@@ -11,9 +14,9 @@ static void OnKeyEvent(GLFWwindow* win, int key, int action) {
11} 14}
12 15
13static void OnWindowSizeEvent(GLFWwindow* win, int width, int height) { 16static void OnWindowSizeEvent(GLFWwindow* win, int width, int height) {
14 EmuWindow_GLFW* emuwin = (EmuWindow_GLFW*)glfwGetWindowUserPointer(win); 17 EmuWindow_GLFW* emu_window = (EmuWindow_GLFW*)glfwGetWindowUserPointer(win);
15 emuwin->set_client_area_width(width); 18 emu_window->SetClientAreaWidth(width);
16 emuwin->set_client_area_height(height); 19 emu_window->SetClientAreaHeight(height);
17} 20}
18 21
19/// EmuWindow_GLFW constructor 22/// EmuWindow_GLFW constructor
@@ -25,13 +28,14 @@ EmuWindow_GLFW::EmuWindow_GLFW() {
25 } 28 }
26 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); 29 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
27 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1); 30 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
28 render_window_ = glfwCreateWindow(VideoCore::kScreenTopWidth, 31 m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth,
29 (VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight), "citra", NULL, NULL); 32 (VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight),
33 m_window_title.c_str(), NULL, NULL);
30 34
31 // Setup callbacks 35 // Setup callbacks
32 glfwSetWindowUserPointer(render_window_, this); 36 glfwSetWindowUserPointer(m_render_window, this);
33 //glfwSetKeyCallback(render_window_, OnKeyEvent); 37 //glfwSetKeyCallback(m_render_window, OnKeyEvent);
34 //glfwSetWindowSizeCallback(render_window_, OnWindowSizeEvent); 38 //glfwSetWindowSizeCallback(m_render_window, OnWindowSizeEvent);
35 39
36 DoneCurrent(); 40 DoneCurrent();
37} 41}
@@ -43,23 +47,17 @@ EmuWindow_GLFW::~EmuWindow_GLFW() {
43 47
44/// Swap buffers to display the next frame 48/// Swap buffers to display the next frame
45void EmuWindow_GLFW::SwapBuffers() { 49void EmuWindow_GLFW::SwapBuffers() {
46 glfwSwapBuffers(render_window_); 50 glfwSwapBuffers(m_render_window);
47} 51}
48 52
49/// Polls window events 53/// Polls window events
50void EmuWindow_GLFW::PollEvents() { 54void EmuWindow_GLFW::PollEvents() {
51 // TODO(ShizZy): Does this belong here? This is a reasonable place to update the window title
52 // from the main thread, but this should probably be in an event handler...
53 static char title[128];
54 sprintf(title, "%s (FPS: %02.02f)", window_title_.c_str(), 0.0f);
55 glfwSetWindowTitle(render_window_, title);
56
57 glfwPollEvents(); 55 glfwPollEvents();
58} 56}
59 57
60/// Makes the GLFW OpenGL context current for the caller thread 58/// Makes the GLFW OpenGL context current for the caller thread
61void EmuWindow_GLFW::MakeCurrent() { 59void EmuWindow_GLFW::MakeCurrent() {
62 glfwMakeContextCurrent(render_window_); 60 glfwMakeContextCurrent(m_render_window);
63} 61}
64 62
65/// Releases (dunno if this is the "right" word) the GLFW context from the caller thread 63/// Releases (dunno if this is the "right" word) the GLFW context from the caller thread
diff --git a/src/citra/emu_window/emu_window_glfw.h b/src/citra/emu_window/emu_window_glfw.h
index 6499315c8..5898ec177 100644
--- a/src/citra/emu_window/emu_window_glfw.h
+++ b/src/citra/emu_window/emu_window_glfw.h
@@ -26,7 +26,7 @@ public:
26 /// Releases (dunno if this is the "right" word) the GLFW context from the caller thread 26 /// Releases (dunno if this is the "right" word) the GLFW context from the caller thread
27 void DoneCurrent(); 27 void DoneCurrent();
28 28
29 GLFWwindow* render_window_; ///< Internal GLFW render window 29 GLFWwindow* m_render_window; ///< Internal GLFW render window
30 30
31private: 31private:
32 32
diff --git a/src/citra/version.h b/src/citra/version.h
deleted file mode 100644
index 07b88c641..000000000
--- a/src/citra/version.h
+++ /dev/null
@@ -1,6 +0,0 @@
1// GENERATED - Do not edit!
2#ifndef VERSION_H_
3#define VERSION_H_
4#define __BUILD__ "122"
5#define VERSION __BUILD__
6#endif // VERSION_H_