yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

Fixed indents

This commit is contained in:
archshift 2014-04-30 20:12:01 -07:00
parent 948cfe6d37
commit 704075f04a
8 changed files with 66 additions and 68 deletions

View File

@ -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})

View File

@ -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);

View File

@ -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})

View File

@ -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);
*/
*/
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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();