Cleanup some bad rebasing. Fix clang style

This commit is contained in:
Anon 2016-12-17 10:25:27 -06:00
parent 5bae894761
commit 81be512755
10 changed files with 23 additions and 44 deletions

View File

@ -57,7 +57,7 @@ void Config::ReadValues() {
Settings::values.pad_circle_modifier =
Settings::InputDeviceMapping(sdl2_config->Get("Controls", "pad_circle_modifier", ""));
Settings::values.pad_circle_modifier_scale =
(float)sdl2_config->GetReal("Controls", "pad_circle_modifier_scale", 0.4);
(float)sdl2_config->GetReal("Controls", "pad_circle_modifier_scale", 0.5);
Settings::values.pad_circle_deadzone =
(float)sdl2_config->GetReal("Controls", "pad_circle_deadzone", 0.4);

View File

@ -34,9 +34,13 @@ pad_circle_right =
pad_circle_modifier =
# The applied modifier scale to circle pad.
# Must be in range of 0.0-1.0. Defaults to 0.4
# Must be in range of 0.0-1.0. Defaults to 0.5
pad_circle_modifier_scale =
# Deadzone applied to the circle pad.
# Must be in range of 0.0 - 1.0. Defaults to 0.4
pad_circle_deadzone =
[Core]
# Whether to use the Just-In-Time (JIT) compiler for CPU emulation
# 0: Interpreter (slow), 1 (default): JIT (fast)

View File

@ -14,8 +14,8 @@
#include "core/hle/service/hid/hid.h"
#include "core/settings.h"
#include "input_core/input_core.h"
#include "input_core/devices/keyboard.h"
#include "input_core/input_core.h"
#include "citra/emu_window/emu_window_sdl2.h"
@ -58,7 +58,6 @@ void EmuWindow_SDL2::OnResize() {
}
EmuWindow_SDL2::EmuWindow_SDL2() {
keyboard_id = 0;
SDL_SetMainReady();
@ -166,6 +165,7 @@ void EmuWindow_SDL2::DoneCurrent() {
SDL_GL_MakeCurrent(render_window, nullptr);
}
void EmuWindow_SDL2::OnMinimalClientAreaChangeRequest(const std::pair<unsigned, unsigned>& minimal_size) {
void EmuWindow_SDL2::OnMinimalClientAreaChangeRequest(
const std::pair<unsigned, unsigned>& minimal_size) {
SDL_SetWindowMinimumSize(render_window, minimal_size.first, minimal_size.second);
}
}

View File

@ -115,32 +115,6 @@ GRenderWindow::GRenderWindow(QWidget* parent, EmuThread* emu_thread)
std::string window_title =
Common::StringFromFormat("Citra | %s-%s", Common::g_scm_branch, Common::g_scm_desc);
setWindowTitle(QString::fromStdString(window_title));
keyboard_id = 0;
// TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground,
// WA_DontShowOnScreen, WA_DeleteOnClose
QGLFormat fmt;
fmt.setVersion(3, 3);
fmt.setProfile(QGLFormat::CoreProfile);
// Requests a forward-compatible context, which is required to get a 3.2+ context on OS X
fmt.setOption(QGL::NoDeprecatedFunctions);
child = new GGLWidgetInternal(fmt, this);
QBoxLayout* layout = new QHBoxLayout(this);
resize(VideoCore::kScreenTopWidth,
VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight);
layout->addWidget(child);
layout->setMargin(0);
setLayout(layout);
OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size);
OnFramebufferSizeChanged();
NotifyClientAreaSizeChanged(std::pair<unsigned, unsigned>(child->width(), child->height()));
BackupGeometry();
}
void GRenderWindow::moveContext() {

View File

@ -38,10 +38,12 @@ void EmuWindow::TouchPressed(unsigned framebuffer_x, unsigned framebuffer_y) {
if (!IsWithinTouchscreen(framebuffer_layout, framebuffer_x, framebuffer_y))
return;
int touch_x = VideoCore::kScreenBottomWidth * (framebuffer_x - framebuffer_layout.bottom_screen.left) /
(framebuffer_layout.bottom_screen.right - framebuffer_layout.bottom_screen.left);
int touch_y = VideoCore::kScreenBottomHeight * (framebuffer_y - framebuffer_layout.bottom_screen.top) /
(framebuffer_layout.bottom_screen.bottom - framebuffer_layout.bottom_screen.top);
int touch_x = VideoCore::kScreenBottomWidth *
(framebuffer_x - framebuffer_layout.bottom_screen.left) /
(framebuffer_layout.bottom_screen.right - framebuffer_layout.bottom_screen.left);
int touch_y = VideoCore::kScreenBottomHeight *
(framebuffer_y - framebuffer_layout.bottom_screen.top) /
(framebuffer_layout.bottom_screen.bottom - framebuffer_layout.bottom_screen.top);
touch_pressed = true;
InputCore::SetTouchState(std::make_tuple(touch_x, touch_y, true));
auto pad_state = InputCore::GetPadState();

View File

@ -212,8 +212,8 @@ private:
WindowConfig active_config; ///< Internal active configuration
bool touch_pressed; ///< True if touchpad area is currently pressed, otherwise false
/**
* Clip the provided coordinates to be inside the touchscreen area.
*/
std::tuple<unsigned,unsigned> ClipToTouchScreen(unsigned new_x, unsigned new_y);
/**
* Clip the provided coordinates to be inside the touchscreen area.
*/
std::tuple<unsigned, unsigned> ClipToTouchScreen(unsigned new_x, unsigned new_y);
};

View File

@ -87,7 +87,7 @@ enum class Class : ClassType {
Loader, ///< ROM loader
Input, ///< Input backend
Count ///< Total number of logging classes
Count ///< Total number of logging classes
};
/// Logs a message to the global logger.

View File

@ -5,10 +5,10 @@
#include <cmath>
#include "common/emu_window.h"
#include "core/hle/service/service.h"
#include "core/hle/service/hid/hid.h"
#include "core/hle/service/hid/hid_spvr.h"
#include "core/hle/service/hid/hid_user.h"
#include "core/hle/service/service.h"
#include "input_core/input_core.h"

View File

@ -551,7 +551,6 @@ static void VBlankCallback(u64 userdata, int cycles_late) {
Service::GSP::SignalInterrupt(Service::GSP::InterruptId::PDC0);
Service::GSP::SignalInterrupt(Service::GSP::InterruptId::PDC1);
if (!Settings::values.use_vsync && Settings::values.toggle_framelimit) {
FrameLimiter();
}

View File

@ -11,8 +11,8 @@
#include "core/hle/kernel/memory.h"
#include "core/hw/hw.h"
#include "core/system.h"
#include "video_core/video_core.h"
#include "input_core/input_core.h"
#include "video_core/video_core.h"
namespace System {