summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/common.h4
-rw-r--r--src/common/emu_window.h100
-rw-r--r--src/common/scm_rev.h8
-rw-r--r--src/common/version.cpp12
4 files changed, 52 insertions, 72 deletions
diff --git a/src/common/common.h b/src/common/common.h
index 8795c8a0e..64a0d7812 100644
--- a/src/common/common.h
+++ b/src/common/common.h
@@ -13,8 +13,8 @@
13#include <string.h> 13#include <string.h>
14 14
15// SVN version number 15// SVN version number
16extern const char *scm_rev_str; 16extern const char *g_scm_rev_str;
17extern const char *netplay_dolphin_ver; 17extern const char *g_netplay_citra_ver;
18 18
19// Force enable logging in the right modes. For some reason, something had changed 19// Force enable logging in the right modes. For some reason, something had changed
20// so that debugfast no longer logged. 20// so that debugfast no longer logged.
diff --git a/src/common/emu_window.h b/src/common/emu_window.h
index 7f68c9237..731784756 100644
--- a/src/common/emu_window.h
+++ b/src/common/emu_window.h
@@ -1,36 +1,10 @@
1/** 1// Copyright 2014 Citra Emulator Project
2 * Copyright (C) 2005-2012 Gekko Emulator 2// Licensed under GPLv2
3 * 3// Refer to the license.txt file included.
4 * @file emu_window.h
5 * @author Neobrain
6 * @date 2012-06-01
7 * @brief Interface for implementing an emulator window manager
8 *
9 * @section LICENSE
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details at
19 * http://www.gnu.org/copyleft/gpl.html
20 *
21 * Official project repository can be found at:
22 * http://code.google.com/p/gekko-gc-emu/
23 */
24
25#ifndef CORE_EMUWINDOW_H_
26#define CORE_EMUWINDOW_H_
27 4
28#include "common/common.h" 5#pragma once
29 6
30//namespace input_common 7#include "common/common.h"
31//{
32//class KeyboardInput;
33//}
34 8
35// Abstraction class used to provide an interface between emulation code and the frontend (e.g. SDL, 9// Abstraction class used to provide an interface between emulation code and the frontend (e.g. SDL,
36// QGLWidget, GLFW, etc...) 10// QGLWidget, GLFW, etc...)
@@ -57,46 +31,52 @@ public:
57 /// Releases (dunno if this is the "right" word) the GLFW context from the caller thread 31 /// Releases (dunno if this is the "right" word) the GLFW context from the caller thread
58 virtual void DoneCurrent() = 0; 32 virtual void DoneCurrent() = 0;
59 33
60 /** 34 Config GetConfig() const {
61 * @brief Called from KeyboardInput constructor to notify EmuWindow about its presence 35 return m_config;
62 * @param controller_interface Pointer to a running KeyboardInput interface 36 }
63 */ 37
64 //void set_controller_interface(input_common::KeyboardInput* controller_interface) { 38 void SetConfig(const Config& val) {
65 // controller_interface_ = controller_interface; 39 m_config = val;
66 //} 40 }
67 //input_common::KeyboardInput* controller_interface() { return controller_interface_; }
68
69 Config config() { return config_; }
70 void set_config(Config val) { config_ = val; }
71 41
72 int client_area_width() { return client_area_width_; } 42 int GetClientAreaWidth() const {
73 void set_client_area_width(int val) { client_area_width_ = val; } 43 return m_client_area_width;
44 }
74 45
75 int client_area_height() { return client_area_height_; } 46 void SetClientAreaWidth(const int val) {
76 void set_client_area_height(int val) { client_area_height_ = val; } 47 m_client_area_width = val;
48 }
77 49
78 std::string window_title() { return window_title_; } 50 int GetClientAreaHeight() const {
79 void set_window_title(std::string val) { window_title_ = val; } 51 return m_client_area_height;
52 }
53
54 void SetClientAreaHeight(const int val) {
55 m_client_area_height = val;
56 }
57
58 std::string GetWindowTitle() {
59 return m_window_title;
60 }
61
62 void SetWindowTitle(std::string val) {
63 m_window_title = val;
64 }
80 65
81protected: 66protected:
82 EmuWindow() : client_area_width_(640), client_area_height_(480) { 67 EmuWindow() : m_client_area_width(640), m_client_area_height(480) {
83 char window_title[255]; 68 char window_title[255];
84 sprintf(window_title, "citra [%s|%s] - %s", 69 sprintf(window_title, "citra-%s", g_scm_rev_str);
85 "null-cpu", 70 m_window_title = window_title;
86 "null-renderer",
87 __DATE__);
88 window_title_ = window_title;
89 } 71 }
90 virtual ~EmuWindow() {} 72 virtual ~EmuWindow() {}
91 73
92 std::string window_title_; ///< Current window title, should be used by window impl. 74 std::string m_window_title; ///< Current window title, should be used by window impl.
93 75
94 int client_area_width_; ///< Current client width, should be set by window impl. 76 int m_client_area_width; ///< Current client width, should be set by window impl.
95 int client_area_height_; ///< Current client height, should be set by window impl. 77 int m_client_area_height; ///< Current client height, should be set by window impl.
96 78
97private: 79private:
98 Config config_; ///< Internal configuration 80 Config m_config; ///< Internal configuration
99 81
100}; 82};
101
102#endif // CORE_EMUWINDOW_H_
diff --git a/src/common/scm_rev.h b/src/common/scm_rev.h
index 62a304f40..cd5df9ca8 100644
--- a/src/common/scm_rev.h
+++ b/src/common/scm_rev.h
@@ -1,4 +1,4 @@
1#define SCM_REV_STR "de0a034a849f5a1cbe2fed9ef2cc4095c56e672a" 1#define SCM_REV_STR "d0674cc98bfa5729168274cde62a4e69343f8524"
2#define SCM_DESC_STR "de0a034" 2#define SCM_DESC_STR "d0674cc"
3#define SCM_BRANCH_STR "fixed-directorys-for-neo" 3#define SCM_BRANCH_STR "master"
4#define SCM_IS_MASTER 0 4#define SCM_IS_MASTER 1
diff --git a/src/common/version.cpp b/src/common/version.cpp
index f0df884d7..2e0c7390c 100644
--- a/src/common/version.cpp
+++ b/src/common/version.cpp
@@ -13,7 +13,7 @@
13 #define BUILD_TYPE_STR "" 13 #define BUILD_TYPE_STR ""
14#endif 14#endif
15 15
16const char *scm_rev_str = "emu " 16const char *g_scm_rev_str =
17#if !SCM_IS_MASTER 17#if !SCM_IS_MASTER
18 "[" SCM_BRANCH_STR "] " 18 "[" SCM_BRANCH_STR "] "
19#endif 19#endif
@@ -35,11 +35,11 @@ const char *scm_rev_str = "emu "
35#endif 35#endif
36 36
37#ifdef _WIN32 37#ifdef _WIN32
38const char *netplay_dolphin_ver = SCM_DESC_STR " W" NP_ARCH; 38const char *g_netplay_citra_ver = SCM_DESC_STR " W" NP_ARCH;
39#elif __APPLE__ 39#elif __APPLE__
40const char *netplay_dolphin_ver = SCM_DESC_STR " M" NP_ARCH; 40const char *g_netplay_citra_ver = SCM_DESC_STR " M" NP_ARCH;
41#else 41#else
42const char *netplay_dolphin_ver = SCM_DESC_STR " L" NP_ARCH; 42const char *g_netplay_citra_ver = SCM_DESC_STR " L" NP_ARCH;
43#endif 43#endif
44 44
45const char *scm_rev_git_str = SCM_REV_STR; 45const char *scm_rev_git_str = SCM_REV_STR;