summaryrefslogtreecommitdiffstats
path: root/src/android/app/src/main/jni/android_settings.h
blob: cf93304daf891ab011004cbd157c72f8478fb43e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <common/settings_common.h>
#include "common/common_types.h"
#include "common/settings_setting.h"

namespace AndroidSettings {

struct GameDir {
    std::string path;
    bool deep_scan = false;
};

struct OverlayControlData {
    std::string id;
    bool enabled;
    std::pair<double, double> landscape_position;
    std::pair<double, double> portrait_position;
    std::pair<double, double> foldable_position;
};

struct Values {
    Settings::Linkage linkage;

    // Path settings
    std::vector<GameDir> game_dirs;

    // Android
    Settings::Setting<bool> picture_in_picture{linkage, false, "picture_in_picture",
                                               Settings::Category::Android};
    Settings::Setting<s32> screen_layout{linkage,
                                         5,
                                         "screen_layout",
                                         Settings::Category::Android,
                                         Settings::Specialization::Default,
                                         true,
                                         true};

    Settings::SwitchableSetting<std::string, false> driver_path{linkage, "", "driver_path",
                                                                Settings::Category::GpuDriver};

    Settings::Setting<s32> theme{linkage, 0, "theme", Settings::Category::Android};
    Settings::Setting<s32> theme_mode{linkage, -1, "theme_mode", Settings::Category::Android};
    Settings::Setting<bool> black_backgrounds{linkage, false, "black_backgrounds",
                                              Settings::Category::Android};

    // Input/performance overlay settings
    std::vector<OverlayControlData> overlay_control_data;
    Settings::Setting<s32> overlay_scale{linkage, 50, "control_scale", Settings::Category::Overlay};
    Settings::Setting<s32> overlay_opacity{linkage, 100, "control_opacity",
                                           Settings::Category::Overlay};

    Settings::Setting<bool> joystick_rel_center{linkage, true, "joystick_rel_center",
                                                Settings::Category::Overlay};
    Settings::Setting<bool> dpad_slide{linkage, true, "dpad_slide", Settings::Category::Overlay};
    Settings::Setting<bool> haptic_feedback{linkage, true, "haptic_feedback",
                                            Settings::Category::Overlay};
    Settings::Setting<bool> show_performance_overlay{linkage, true, "show_performance_overlay",
                                                     Settings::Category::Overlay};
    Settings::Setting<bool> show_input_overlay{linkage, true, "show_input_overlay",
                                               Settings::Category::Overlay};
    Settings::Setting<bool> touchscreen{linkage, true, "touchscreen", Settings::Category::Overlay};
    Settings::Setting<s32> lock_drawer{linkage, false, "lock_drawer", Settings::Category::Overlay};
};

extern Values values;

} // namespace AndroidSettings