| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- // Copyright 2014 Citra Emulator Project
- // Licensed under GPLv2 or any later version
- // Refer to the license.txt file included.
- #pragma once
- #include <array>
- #include <string>
- #include "common/common_types.h"
- namespace Settings {
- namespace NativeButton {
- enum Values {
- A,
- B,
- X,
- Y,
- LStick,
- RStick,
- L,
- R,
- ZL,
- ZR,
- Plus,
- Minus,
- DLeft,
- DUp,
- DRight,
- DDown,
- LStick_Left,
- LStick_Up,
- LStick_Right,
- LStick_Down,
- RStick_Left,
- RStick_Up,
- RStick_Right,
- RStick_Down,
- SL,
- SR,
- Home,
- Screenshot,
- NumButtons,
- };
- constexpr int BUTTON_HID_BEGIN = A;
- constexpr int BUTTON_NS_BEGIN = Home;
- constexpr int BUTTON_HID_END = BUTTON_NS_BEGIN;
- constexpr int BUTTON_NS_END = NumButtons;
- constexpr int NUM_BUTTONS_HID = BUTTON_HID_END - BUTTON_HID_BEGIN;
- constexpr int NUM_BUTTONS_NS = BUTTON_NS_END - BUTTON_NS_BEGIN;
- static const std::array<const char*, NumButtons> mapping = {{
- "button_a",
- "button_b",
- "button_x",
- "button_y",
- "button_lstick",
- "button_rstick",
- "button_l",
- "button_r",
- "button_zl",
- "button_zr",
- "button_plus",
- "button_minus",
- "button_dleft",
- "button_dup",
- "button_dright",
- "button_ddown",
- "button_lstick_left",
- "button_lstick_up",
- "button_lstick_right",
- "button_lstick_down",
- "button_rstick_left",
- "button_rstick_up",
- "button_rstick_right",
- "button_rstick_down",
- "button_sl",
- "button_sr",
- "button_home",
- "button_screenshot",
- }};
- } // namespace NativeButton
- namespace NativeAnalog {
- enum Values {
- LStick,
- RStick,
- NumAnalogs,
- };
- constexpr int STICK_HID_BEGIN = LStick;
- constexpr int STICK_HID_END = NumAnalogs;
- constexpr int NUM_STICKS_HID = NumAnalogs;
- static const std::array<const char*, NumAnalogs> mapping = {{
- "lstick",
- "rstick",
- }};
- } // namespace NativeAnalog
- struct Values {
- // System
- bool use_docked_mode;
- // Controls
- std::array<std::string, NativeButton::NumButtons> buttons;
- std::array<std::string, NativeAnalog::NumAnalogs> analogs;
- std::string motion_device;
- std::string touch_device;
- // Core
- bool use_cpu_jit;
- bool use_multi_core;
- // Data Storage
- bool use_virtual_sd;
- // Renderer
- float resolution_factor;
- bool toggle_framelimit;
- bool use_accurate_framebuffers;
- float bg_red;
- float bg_green;
- float bg_blue;
- std::string log_filter;
- // Debugging
- bool use_gdbstub;
- u16 gdbstub_port;
- } extern values;
- void Apply();
- } // namespace Settings
|