Added Toggle Freelook Hotkey
This commit is contained in:
parent
534547ee8b
commit
ac34911f32
|
@ -22,7 +22,7 @@
|
|||
#include "InputCommon/GCPadStatus.h"
|
||||
|
||||
// clang-format off
|
||||
constexpr std::array<const char*, 133> s_hotkey_labels{{
|
||||
constexpr std::array<const char*, 134> s_hotkey_labels{{
|
||||
_trans("Open"),
|
||||
_trans("Change Disc"),
|
||||
_trans("Eject Disc"),
|
||||
|
@ -124,6 +124,7 @@ constexpr std::array<const char*, 133> s_hotkey_labels{{
|
|||
_trans("Freelook Zoom In"),
|
||||
_trans("Freelook Zoom Out"),
|
||||
_trans("Freelook Reset"),
|
||||
_trans("Freelook Toggle"),
|
||||
|
||||
_trans("Toggle 3D Side-by-Side"),
|
||||
_trans("Toggle 3D Top-Bottom"),
|
||||
|
@ -290,7 +291,7 @@ constexpr std::array<HotkeyGroupInfo, NUM_HOTKEY_GROUPS> s_groups_info = {
|
|||
{_trans("Controller Profile"), HK_NEXT_WIIMOTE_PROFILE_1, HK_PREV_GAME_WIIMOTE_PROFILE_4},
|
||||
{_trans("Graphics Toggles"), HK_TOGGLE_CROP, HK_TOGGLE_TEXTURES},
|
||||
{_trans("Internal Resolution"), HK_INCREASE_IR, HK_DECREASE_IR},
|
||||
{_trans("Freelook"), HK_FREELOOK_DECREASE_SPEED, HK_FREELOOK_RESET},
|
||||
{_trans("Freelook"), HK_FREELOOK_DECREASE_SPEED, HK_FREELOOK_TOGGLE},
|
||||
// i18n: Stereoscopic 3D
|
||||
{_trans("3D"), HK_TOGGLE_STEREO_SBS, HK_TOGGLE_STEREO_ANAGLYPH},
|
||||
// i18n: Stereoscopic 3D
|
||||
|
|
|
@ -110,6 +110,7 @@ enum Hotkey
|
|||
HK_FREELOOK_ZOOM_IN,
|
||||
HK_FREELOOK_ZOOM_OUT,
|
||||
HK_FREELOOK_RESET,
|
||||
HK_FREELOOK_TOGGLE,
|
||||
|
||||
HK_TOGGLE_STEREO_SBS,
|
||||
HK_TOGGLE_STEREO_TAB,
|
||||
|
|
|
@ -524,6 +524,13 @@ void HotkeyScheduler::Run()
|
|||
// Freelook
|
||||
static float fl_speed = 1.0;
|
||||
|
||||
if (IsHotkey(HK_FREELOOK_TOGGLE))
|
||||
{
|
||||
const bool new_value = !Config::Get(Config::GFX_FREE_LOOK);
|
||||
Config::SetCurrent(Config::GFX_FREE_LOOK, new_value);
|
||||
OSD::AddMessage(StringFromFormat("Freelook: %s", new_value ? "Enabled" : "Disabled"));
|
||||
}
|
||||
|
||||
if (IsHotkey(HK_FREELOOK_DECREASE_SPEED, true))
|
||||
fl_speed /= 1.1f;
|
||||
|
||||
|
|
Loading…
Reference in New Issue