From dc8479928c5aee4c6ad6fe4f59006fb604cee701 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 18 Sep 2016 09:38:01 +0900 Subject: Sources: Run clang-format on everything. --- src/citra/emu_window/emu_window_sdl2.cpp | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'src/citra/emu_window/emu_window_sdl2.cpp') diff --git a/src/citra/emu_window/emu_window_sdl2.cpp b/src/citra/emu_window/emu_window_sdl2.cpp index da12307b7..12f3e2c71 100644 --- a/src/citra/emu_window/emu_window_sdl2.cpp +++ b/src/citra/emu_window/emu_window_sdl2.cpp @@ -16,8 +16,8 @@ #include "common/scm_rev.h" #include "common/string_util.h" -#include "core/settings.h" #include "core/hle/service/hid/hid.h" +#include "core/settings.h" #include "citra/emu_window/emu_window_sdl2.h" @@ -40,9 +40,9 @@ void EmuWindow_SDL2::OnMouseButton(u32 button, u8 state, s32 x, s32 y) { void EmuWindow_SDL2::OnKeyEvent(int key, u8 state) { if (state == SDL_PRESSED) { - KeyMap::PressKey(*this, { key, keyboard_id }); + KeyMap::PressKey(*this, {key, keyboard_id}); } else if (state == SDL_RELEASED) { - KeyMap::ReleaseKey(*this, { key, keyboard_id }); + KeyMap::ReleaseKey(*this, {key, keyboard_id}); } } @@ -55,7 +55,8 @@ void EmuWindow_SDL2::OnResize() { SDL_GetWindowSize(render_window, &width, &height); - NotifyFramebufferLayoutChanged(EmuWindow::FramebufferLayout::DefaultScreenLayout(width, height)); + NotifyFramebufferLayoutChanged( + EmuWindow::FramebufferLayout::DefaultScreenLayout(width, height)); } EmuWindow_SDL2::EmuWindow_SDL2() { @@ -80,12 +81,13 @@ EmuWindow_SDL2::EmuWindow_SDL2() { SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 0); - std::string window_title = Common::StringFromFormat("Citra | %s-%s", Common::g_scm_branch, Common::g_scm_desc); - render_window = SDL_CreateWindow(window_title.c_str(), + std::string window_title = + Common::StringFromFormat("Citra | %s-%s", Common::g_scm_branch, Common::g_scm_desc); + render_window = SDL_CreateWindow( + window_title.c_str(), SDL_WINDOWPOS_UNDEFINED, // x position SDL_WINDOWPOS_UNDEFINED, // y position - VideoCore::kScreenTopWidth, - VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight, + VideoCore::kScreenTopWidth, VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); if (render_window == nullptr) { @@ -171,10 +173,13 @@ void EmuWindow_SDL2::DoneCurrent() { void EmuWindow_SDL2::ReloadSetKeymaps() { KeyMap::ClearKeyMapping(keyboard_id); for (int i = 0; i < Settings::NativeInput::NUM_INPUTS; ++i) { - KeyMap::SetKeyMapping({ Settings::values.input_mappings[Settings::NativeInput::All[i]], keyboard_id }, KeyMap::mapping_targets[i]); + KeyMap::SetKeyMapping( + {Settings::values.input_mappings[Settings::NativeInput::All[i]], keyboard_id}, + KeyMap::mapping_targets[i]); } } -void EmuWindow_SDL2::OnMinimalClientAreaChangeRequest(const std::pair& minimal_size) { +void EmuWindow_SDL2::OnMinimalClientAreaChangeRequest( + const std::pair& minimal_size) { SDL_SetWindowMinimumSize(render_window, minimal_size.first, minimal_size.second); } -- cgit v1.2.3