summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-05-01 05:12:01 +0200
committerarchshift <admin@archshift.com>2014-05-01 05:13:28 +0200
commit704075f04a8adda82141f3c68addfd6c34a08765 (patch)
tree4f2d735372ffd90d59ec0cac28da76411c7c758f
parentReverse debugging changes (diff)
downloadyuzu-704075f04a8adda82141f3c68addfd6c34a08765.tar
yuzu-704075f04a8adda82141f3c68addfd6c34a08765.tar.gz
yuzu-704075f04a8adda82141f3c68addfd6c34a08765.tar.bz2
yuzu-704075f04a8adda82141f3c68addfd6c34a08765.tar.lz
yuzu-704075f04a8adda82141f3c68addfd6c34a08765.tar.xz
yuzu-704075f04a8adda82141f3c68addfd6c34a08765.tar.zst
yuzu-704075f04a8adda82141f3c68addfd6c34a08765.zip
-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})
if (APPLE)
target_link_libraries(citra core common video_core iconv pthread ${COREFOUNDATION_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLFW_LIBRARIES})
else()
- 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})
+ 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})
endif()
#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() {
}
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
- glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
- glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
+ glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
+ glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth,
(VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight),
m_window_title.c_str(), NULL, NULL);
- if (m_render_window == NULL) {
- printf("Failed to create GLFW window! Exiting...");
- exit(1);
- }
-
+ if (m_render_window == NULL) {
+ printf("Failed to create GLFW window! Exiting...");
+ exit(1);
+ }
+
// Setup callbacks
glfwSetWindowUserPointer(m_render_window, this);
//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})
if (APPLE)
target_link_libraries(citra-qt core common video_core qhexedit iconv ${COREFOUNDATION_LIBRARY} ${QT_LIBRARIES} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES})
else()
- target_link_libraries(citra-qt core common video_core qhexedit ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${SDL2_LIBRARY} rt GLEW ${GLFW_LIBRARIES})
+ target_link_libraries(citra-qt core common video_core qhexedit ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${SDL2_LIBRARY} rt GLEW ${GLFW_LIBRARIES})
endif()
#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()
void EmuThread::Stop()
{
- if (!isRunning())
+ if (!isRunning())
{
INFO_LOG(MASTER_LOG, "EmuThread::Stop called while emu thread wasn't running, returning...");
return;
@@ -62,7 +62,7 @@ void EmuThread::Stop()
terminate();
wait(1000);
if (isRunning())
- WARN_LOG(MASTER_LOG, "EmuThread STILL running, something is wrong here...");
+ WARN_LOG(MASTER_LOG, "EmuThread STILL running, something is wrong here...");
}
INFO_LOG(MASTER_LOG, "EmuThread stopped");
}
@@ -75,8 +75,8 @@ class GGLWidgetInternal : public QGLWidget
public:
GGLWidgetInternal(QGLFormat fmt, GRenderWindow* parent) : QGLWidget(parent)
{
- doneCurrent();
- parent_ = parent;
+ doneCurrent();
+ parent_ = parent;
}
void paintEvent(QPaintEvent* ev)
@@ -102,12 +102,12 @@ EmuThread& GRenderWindow::GetEmuThread()
GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this)
{
// TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose
- QGLFormat fmt;
- fmt.setProfile(QGLFormat::CoreProfile);
- fmt.setVersion(4,1);
- fmt.setSampleBuffers(true);
- fmt.setSamples(4);
-
+ QGLFormat fmt;
+ fmt.setProfile(QGLFormat::CoreProfile);
+ fmt.setVersion(4,1);
+ fmt.setSampleBuffers(true);
+ fmt.setSamples(4);
+
child = new GGLWidgetInternal(fmt, this);
QBoxLayout* layout = new QHBoxLayout(this);
resize(VideoCore::kScreenTopWidth, VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight);
@@ -148,12 +148,12 @@ void GRenderWindow::DoneCurrent()
void GRenderWindow::PollEvents() {
// TODO(ShizZy): Does this belong here? This is a reasonable place to update the window title
// from the main thread, but this should probably be in an event handler...
- /*
- static char title[128];
+ /*
+ static char title[128];
sprintf(title, "%s (FPS: %02.02f)", window_title_.c_str(),
video_core::g_renderer->current_fps());
setWindowTitle(title);
- */
+ */
}
void GRenderWindow::BackupGeometry()
@@ -186,26 +186,26 @@ QByteArray GRenderWindow::saveGeometry()
void GRenderWindow::keyPressEvent(QKeyEvent* event)
{
- /*
- bool key_processed = false;
+ /*
+ bool key_processed = false;
for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel)
if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::PRESSED))
key_processed = true;
if (!key_processed)
QWidget::keyPressEvent(event);
- */
+ */
}
void GRenderWindow::keyReleaseEvent(QKeyEvent* event)
{
- /*
- bool key_processed = false;
+ /*
+ bool key_processed = false;
for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel)
if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::RELEASED))
key_processed = true;
if (!key_processed)
QWidget::keyPressEvent(event);
- */
+ */
} \ 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
memory_util.h
msg_handler.h
platform.h
- scm_rev.h
+ scm_rev.h
std_condition_variable.h
std_mutex.h
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
arm/mmu/wb.h
elf/elf_reader.h
elf/elf_types.h
- file_sys/directory_file_system.h
+ file_sys/directory_file_system.h
file_sys/file_sys.h
file_sys/meta_file_system.h
- hle/hle.h
+ hle/hle.h
hle/mrc.h
hle/syscall.h
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 @@
#include "video_core/utils.h"
namespace VideoCore {
-
- /**
- * Dumps a texture to TGA
- * @param filename String filename to dump texture to
- * @param width Width of texture in pixels
- * @param height Height of texture in pixels
- * @param raw_data Raw RGBA8 texture data to dump
- * @todo This should be moved to some general purpose/common code
- */
- void DumpTGA(std::string filename, int width, int height, u8* raw_data) {
- TGAHeader hdr;
- FILE* fout;
- u8 r, g, b;
-
- memset(&hdr, 0, sizeof(hdr));
- hdr.datatypecode = 2; // uncompressed RGB
- hdr.bitsperpixel = 24; // 24 bpp
- hdr.width = width;
- hdr.height = height;
-
- fout = fopen(filename.c_str(), "wb");
- fwrite(&hdr, sizeof(TGAHeader), 1, fout);
- for (int i = 0; i < height; i++) {
- for (int j = 0; j < width; j++) {
- b = raw_data[(3 * (i * width)) + (3 * j) + 0];
- g = raw_data[(3 * (i * width)) + (3 * j) + 1];
- r = raw_data[(3 * (i * width)) + (3 * j) + 2];
- putc(b, fout);
- putc(g, fout);
- putc(r, fout);
- }
- }
- fclose(fout);
- }
-
+ /**
+ * Dumps a texture to TGA
+ * @param filename String filename to dump texture to
+ * @param width Width of texture in pixels
+ * @param height Height of texture in pixels
+ * @param raw_data Raw RGBA8 texture data to dump
+ * @todo This should be moved to some general purpose/common code
+ */
+ void DumpTGA(std::string filename, int width, int height, u8* raw_data) {
+ TGAHeader hdr;
+ FILE* fout;
+ u8 r, g, b;
+
+ memset(&hdr, 0, sizeof(hdr));
+ hdr.datatypecode = 2; // uncompressed RGB
+ hdr.bitsperpixel = 24; // 24 bpp
+ hdr.width = width;
+ hdr.height = height;
+
+ fout = fopen(filename.c_str(), "wb");
+ fwrite(&hdr, sizeof(TGAHeader), 1, fout);
+ for (int i = 0; i < height; i++) {
+ for (int j = 0; j < width; j++) {
+ b = raw_data[(3 * (i * width)) + (3 * j) + 0];
+ g = raw_data[(3 * (i * width)) + (3 * j) + 1];
+ r = raw_data[(3 * (i * width)) + (3 * j) + 2];
+ putc(b, fout);
+ putc(g, fout);
+ putc(r, fout);
+ }
+ }
+ fclose(fout);
+ }
} // 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() {
/// Initialize the video core
void Init(EmuWindow* emu_window) {
- glewExperimental = GL_TRUE;
-
+ glewExperimental = GL_TRUE;
+
g_emu_window = emu_window;
g_emu_window->MakeCurrent();
g_renderer = new RendererOpenGL();