summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar archshift2014-04-30 20:12:01 -0700
committerGravatar archshift2014-04-30 20:13:28 -0700
commit704075f04a8adda82141f3c68addfd6c34a08765 (patch)
tree4f2d735372ffd90d59ec0cac28da76411c7c758f /src
parentReverse debugging changes (diff)
downloadyuzu-704075f04a8adda82141f3c68addfd6c34a08765.tar.gz
yuzu-704075f04a8adda82141f3c68addfd6c34a08765.tar.xz
yuzu-704075f04a8adda82141f3c68addfd6c34a08765.zip
Fixed indents
Diffstat (limited to 'src')
-rw-r--r--src/citra/CMakeLists.txt2
-rw-r--r--src/citra/emu_window/emu_window_glfw.cpp14
-rw-r--r--src/citra_qt/CMakeLists.txt2
-rw-r--r--src/citra_qt/bootmanager.cpp38
-rw-r--r--src/common/CMakeLists.txt2
-rw-r--r--src/core/CMakeLists.txt4
-rw-r--r--src/video_core/utils.cpp68
-rw-r--r--src/video_core/video_core.cpp4
8 files changed, 66 insertions, 68 deletions
diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt
index 2e4fbe353..7787d6a72 100644
--- a/src/citra/CMakeLists.txt
+++ b/src/citra/CMakeLists.txt
@@ -13,7 +13,7 @@ add_executable(citra ${SRCS} ${HEADS})
13if (APPLE) 13if (APPLE)
14 target_link_libraries(citra core common video_core iconv pthread ${COREFOUNDATION_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLFW_LIBRARIES}) 14 target_link_libraries(citra core common video_core iconv pthread ${COREFOUNDATION_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLFW_LIBRARIES})
15else() 15else()
16 target_link_libraries(citra core common video_core GLEW pthread X11 Xxf86vm Xi Xcursor ${OPENGL_LIBRARIES} ${GLFW_LIBRARIES} rt ${X11_Xrandr_LIB} ${X11_xv86vmode_LIB}) 16 target_link_libraries(citra core common video_core GLEW pthread X11 Xxf86vm Xi Xcursor ${OPENGL_LIBRARIES} ${GLFW_LIBRARIES} rt ${X11_Xrandr_LIB} ${X11_xv86vmode_LIB})
17endif() 17endif()
18 18
19#install(TARGETS citra RUNTIME DESTINATION ${bindir}) 19#install(TARGETS citra RUNTIME DESTINATION ${bindir})
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp
index ea1499e7c..73c116373 100644
--- a/src/citra/emu_window/emu_window_glfw.cpp
+++ b/src/citra/emu_window/emu_window_glfw.cpp
@@ -28,17 +28,17 @@ EmuWindow_GLFW::EmuWindow_GLFW() {
28 } 28 }
29 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); 29 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
30 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); 30 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
31 glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); 31 glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
32 glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); 32 glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
33 m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth, 33 m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth,
34 (VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight), 34 (VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight),
35 m_window_title.c_str(), NULL, NULL); 35 m_window_title.c_str(), NULL, NULL);
36 36
37 if (m_render_window == NULL) { 37 if (m_render_window == NULL) {
38 printf("Failed to create GLFW window! Exiting..."); 38 printf("Failed to create GLFW window! Exiting...");
39 exit(1); 39 exit(1);
40 } 40 }
41 41
42 // Setup callbacks 42 // Setup callbacks
43 glfwSetWindowUserPointer(m_render_window, this); 43 glfwSetWindowUserPointer(m_render_window, this);
44 //glfwSetKeyCallback(m_render_window, OnKeyEvent); 44 //glfwSetKeyCallback(m_render_window, OnKeyEvent);
diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt
index 3a1335544..9d983c0f0 100644
--- a/src/citra_qt/CMakeLists.txt
+++ b/src/citra_qt/CMakeLists.txt
@@ -53,7 +53,7 @@ add_executable(citra-qt ${SRCS} ${HEADS} ${MOC_SRCS} ${UI_HDRS})
53if (APPLE) 53if (APPLE)
54 target_link_libraries(citra-qt core common video_core qhexedit iconv ${COREFOUNDATION_LIBRARY} ${QT_LIBRARIES} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES}) 54 target_link_libraries(citra-qt core common video_core qhexedit iconv ${COREFOUNDATION_LIBRARY} ${QT_LIBRARIES} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES})
55else() 55else()
56 target_link_libraries(citra-qt core common video_core qhexedit ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${SDL2_LIBRARY} rt GLEW ${GLFW_LIBRARIES}) 56 target_link_libraries(citra-qt core common video_core qhexedit ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${SDL2_LIBRARY} rt GLEW ${GLFW_LIBRARIES})
57endif() 57endif()
58 58
59#install(TARGETS citra-qt RUNTIME DESTINATION ${bindir}) 59#install(TARGETS citra-qt RUNTIME DESTINATION ${bindir})
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp
index 52b39eb27..bd01b78c5 100644
--- a/src/citra_qt/bootmanager.cpp
+++ b/src/citra_qt/bootmanager.cpp
@@ -47,7 +47,7 @@ void EmuThread::run()
47 47
48void EmuThread::Stop() 48void EmuThread::Stop()
49{ 49{
50 if (!isRunning()) 50 if (!isRunning())
51 { 51 {
52 INFO_LOG(MASTER_LOG, "EmuThread::Stop called while emu thread wasn't running, returning..."); 52 INFO_LOG(MASTER_LOG, "EmuThread::Stop called while emu thread wasn't running, returning...");
53 return; 53 return;
@@ -62,7 +62,7 @@ void EmuThread::Stop()
62 terminate(); 62 terminate();
63 wait(1000); 63 wait(1000);
64 if (isRunning()) 64 if (isRunning())
65 WARN_LOG(MASTER_LOG, "EmuThread STILL running, something is wrong here..."); 65 WARN_LOG(MASTER_LOG, "EmuThread STILL running, something is wrong here...");
66 } 66 }
67 INFO_LOG(MASTER_LOG, "EmuThread stopped"); 67 INFO_LOG(MASTER_LOG, "EmuThread stopped");
68} 68}
@@ -75,8 +75,8 @@ class GGLWidgetInternal : public QGLWidget
75public: 75public:
76 GGLWidgetInternal(QGLFormat fmt, GRenderWindow* parent) : QGLWidget(parent) 76 GGLWidgetInternal(QGLFormat fmt, GRenderWindow* parent) : QGLWidget(parent)
77 { 77 {
78 doneCurrent(); 78 doneCurrent();
79 parent_ = parent; 79 parent_ = parent;
80 } 80 }
81 81
82 void paintEvent(QPaintEvent* ev) 82 void paintEvent(QPaintEvent* ev)
@@ -102,12 +102,12 @@ EmuThread& GRenderWindow::GetEmuThread()
102GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this) 102GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this)
103{ 103{
104 // TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose 104 // TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose
105 QGLFormat fmt; 105 QGLFormat fmt;
106 fmt.setProfile(QGLFormat::CoreProfile); 106 fmt.setProfile(QGLFormat::CoreProfile);
107 fmt.setVersion(4,1); 107 fmt.setVersion(4,1);
108 fmt.setSampleBuffers(true); 108 fmt.setSampleBuffers(true);
109 fmt.setSamples(4); 109 fmt.setSamples(4);
110 110
111 child = new GGLWidgetInternal(fmt, this); 111 child = new GGLWidgetInternal(fmt, this);
112 QBoxLayout* layout = new QHBoxLayout(this); 112 QBoxLayout* layout = new QHBoxLayout(this);
113 resize(VideoCore::kScreenTopWidth, VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight); 113 resize(VideoCore::kScreenTopWidth, VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight);
@@ -148,12 +148,12 @@ void GRenderWindow::DoneCurrent()
148void GRenderWindow::PollEvents() { 148void GRenderWindow::PollEvents() {
149 // TODO(ShizZy): Does this belong here? This is a reasonable place to update the window title 149 // TODO(ShizZy): Does this belong here? This is a reasonable place to update the window title
150 // from the main thread, but this should probably be in an event handler... 150 // from the main thread, but this should probably be in an event handler...
151 /* 151 /*
152 static char title[128]; 152 static char title[128];
153 sprintf(title, "%s (FPS: %02.02f)", window_title_.c_str(), 153 sprintf(title, "%s (FPS: %02.02f)", window_title_.c_str(),
154 video_core::g_renderer->current_fps()); 154 video_core::g_renderer->current_fps());
155 setWindowTitle(title); 155 setWindowTitle(title);
156 */ 156 */
157} 157}
158 158
159void GRenderWindow::BackupGeometry() 159void GRenderWindow::BackupGeometry()
@@ -186,26 +186,26 @@ QByteArray GRenderWindow::saveGeometry()
186 186
187void GRenderWindow::keyPressEvent(QKeyEvent* event) 187void GRenderWindow::keyPressEvent(QKeyEvent* event)
188{ 188{
189 /* 189 /*
190 bool key_processed = false; 190 bool key_processed = false;
191 for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel) 191 for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel)
192 if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::PRESSED)) 192 if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::PRESSED))
193 key_processed = true; 193 key_processed = true;
194 194
195 if (!key_processed) 195 if (!key_processed)
196 QWidget::keyPressEvent(event); 196 QWidget::keyPressEvent(event);
197 */ 197 */
198} 198}
199 199
200void GRenderWindow::keyReleaseEvent(QKeyEvent* event) 200void GRenderWindow::keyReleaseEvent(QKeyEvent* event)
201{ 201{
202 /* 202 /*
203 bool key_processed = false; 203 bool key_processed = false;
204 for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel) 204 for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel)
205 if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::RELEASED)) 205 if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::RELEASED))
206 key_processed = true; 206 key_processed = true;
207 207
208 if (!key_processed) 208 if (!key_processed)
209 QWidget::keyPressEvent(event); 209 QWidget::keyPressEvent(event);
210 */ 210 */
211} \ No newline at end of file 211} \ No newline at end of file
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 48f30de4c..ae2331070 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -45,7 +45,7 @@ set(HEADS atomic.h
45 memory_util.h 45 memory_util.h
46 msg_handler.h 46 msg_handler.h
47 platform.h 47 platform.h
48 scm_rev.h 48 scm_rev.h
49 std_condition_variable.h 49 std_condition_variable.h
50 std_mutex.h 50 std_mutex.h
51 std_thread.h 51 std_thread.h
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index c8d95ba5d..11b90434d 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -50,10 +50,10 @@ set(HEADS core.h
50 arm/mmu/wb.h 50 arm/mmu/wb.h
51 elf/elf_reader.h 51 elf/elf_reader.h
52 elf/elf_types.h 52 elf/elf_types.h
53 file_sys/directory_file_system.h 53 file_sys/directory_file_system.h
54 file_sys/file_sys.h 54 file_sys/file_sys.h
55 file_sys/meta_file_system.h 55 file_sys/meta_file_system.h
56 hle/hle.h 56 hle/hle.h
57 hle/mrc.h 57 hle/mrc.h
58 hle/syscall.h 58 hle/syscall.h
59 hle/function_wrappers.h 59 hle/function_wrappers.h
diff --git a/src/video_core/utils.cpp b/src/video_core/utils.cpp
index 9fcefaad3..29382c814 100644
--- a/src/video_core/utils.cpp
+++ b/src/video_core/utils.cpp
@@ -8,39 +8,37 @@
8#include "video_core/utils.h" 8#include "video_core/utils.h"
9 9
10namespace VideoCore { 10namespace VideoCore {
11 11 /**
12 /** 12 * Dumps a texture to TGA
13 * Dumps a texture to TGA 13 * @param filename String filename to dump texture to
14 * @param filename String filename to dump texture to 14 * @param width Width of texture in pixels
15 * @param width Width of texture in pixels 15 * @param height Height of texture in pixels
16 * @param height Height of texture in pixels 16 * @param raw_data Raw RGBA8 texture data to dump
17 * @param raw_data Raw RGBA8 texture data to dump 17 * @todo This should be moved to some general purpose/common code
18 * @todo This should be moved to some general purpose/common code 18 */
19 */ 19 void DumpTGA(std::string filename, int width, int height, u8* raw_data) {
20 void DumpTGA(std::string filename, int width, int height, u8* raw_data) { 20 TGAHeader hdr;
21 TGAHeader hdr; 21 FILE* fout;
22 FILE* fout; 22 u8 r, g, b;
23 u8 r, g, b; 23
24 24 memset(&hdr, 0, sizeof(hdr));
25 memset(&hdr, 0, sizeof(hdr)); 25 hdr.datatypecode = 2; // uncompressed RGB
26 hdr.datatypecode = 2; // uncompressed RGB 26 hdr.bitsperpixel = 24; // 24 bpp
27 hdr.bitsperpixel = 24; // 24 bpp 27 hdr.width = width;
28 hdr.width = width; 28 hdr.height = height;
29 hdr.height = height; 29
30 30 fout = fopen(filename.c_str(), "wb");
31 fout = fopen(filename.c_str(), "wb"); 31 fwrite(&hdr, sizeof(TGAHeader), 1, fout);
32 fwrite(&hdr, sizeof(TGAHeader), 1, fout); 32 for (int i = 0; i < height; i++) {
33 for (int i = 0; i < height; i++) { 33 for (int j = 0; j < width; j++) {
34 for (int j = 0; j < width; j++) { 34 b = raw_data[(3 * (i * width)) + (3 * j) + 0];
35 b = raw_data[(3 * (i * width)) + (3 * j) + 0]; 35 g = raw_data[(3 * (i * width)) + (3 * j) + 1];
36 g = raw_data[(3 * (i * width)) + (3 * j) + 1]; 36 r = raw_data[(3 * (i * width)) + (3 * j) + 2];
37 r = raw_data[(3 * (i * width)) + (3 * j) + 2]; 37 putc(b, fout);
38 putc(b, fout); 38 putc(g, fout);
39 putc(g, fout); 39 putc(r, fout);
40 putc(r, fout); 40 }
41 } 41 }
42 } 42 fclose(fout);
43 fclose(fout); 43 }
44 }
45
46} // namespace \ No newline at end of file 44} // namespace \ No newline at end of file
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp
index 4e9cd70bc..5f1933b1e 100644
--- a/src/video_core/video_core.cpp
+++ b/src/video_core/video_core.cpp
@@ -30,8 +30,8 @@ void Start() {
30 30
31/// Initialize the video core 31/// Initialize the video core
32void Init(EmuWindow* emu_window) { 32void Init(EmuWindow* emu_window) {
33 glewExperimental = GL_TRUE; 33 glewExperimental = GL_TRUE;
34 34
35 g_emu_window = emu_window; 35 g_emu_window = emu_window;
36 g_emu_window->MakeCurrent(); 36 g_emu_window->MakeCurrent();
37 g_renderer = new RendererOpenGL(); 37 g_renderer = new RendererOpenGL();