mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-28 09:35:29 +03:00
Rename operationMode
setting to isDocked
This commit is contained in:
parent
69cf25b1a7
commit
3b27540250
@ -55,7 +55,7 @@ static std::string GetTimeZoneName() {
|
||||
}
|
||||
|
||||
template<> void skyline::Settings::Update<skyline::KtSettings>(KtSettings newSettings) {
|
||||
operationMode = newSettings.GetBool("operationMode");
|
||||
isDocked = newSettings.GetBool("isDocked");
|
||||
usernameValue = newSettings.GetString("usernameValue");
|
||||
systemLanguage = newSettings.GetInt<skyline::language::SystemLanguage>("systemLanguage");
|
||||
forceTripleBuffering = newSettings.GetBool("forceTripleBuffering");
|
||||
|
@ -12,7 +12,7 @@ namespace skyline {
|
||||
class Settings {
|
||||
public:
|
||||
// System
|
||||
bool operationMode; //!< If the emulated Switch should be handheld or docked
|
||||
bool isDocked; //!< If the emulated Switch should be handheld or docked
|
||||
std::string usernameValue; //!< The name set by the user to be supplied to the guest
|
||||
language::SystemLanguage systemLanguage; //!< The system language set by the user
|
||||
|
||||
|
@ -15,7 +15,7 @@ namespace skyline::service::am {
|
||||
: BaseService(state, manager),
|
||||
messageEvent(std::make_shared<type::KEvent>(state, false)),
|
||||
defaultDisplayResolutionChangeEvent(std::make_shared<type::KEvent>(state, false)) {
|
||||
operationMode = static_cast<OperationMode>(state.settings->operationMode);
|
||||
operationMode = static_cast<OperationMode>(state.settings->isDocked);
|
||||
Logger::Info("Switch to mode: {}", static_cast<bool>(operationMode) ? "Docked" : "Handheld");
|
||||
QueueMessage(Message::FocusStateChange);
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ class EmulationActivity : AppCompatActivity(), SurfaceHolder.Callback, View.OnTo
|
||||
if (controller.type != ControllerType.None) {
|
||||
val type = when (controller.type) {
|
||||
ControllerType.None -> throw IllegalArgumentException()
|
||||
ControllerType.HandheldProController -> if (settings.operationMode) ControllerType.ProController.id else ControllerType.HandheldProController.id
|
||||
ControllerType.HandheldProController -> if (settings.isDocked) ControllerType.ProController.id else ControllerType.HandheldProController.id
|
||||
ControllerType.ProController, ControllerType.JoyConLeft, ControllerType.JoyConRight -> controller.type.id
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ class Settings @Inject constructor(@ApplicationContext private val context : Con
|
||||
var logCompact by sharedPreferences(context, false)
|
||||
|
||||
// System
|
||||
var operationMode by sharedPreferences(context, true)
|
||||
var isDocked by sharedPreferences(context, true)
|
||||
var usernameValue by sharedPreferences(context, context.getString(R.string.username_default))
|
||||
var systemLanguage by sharedPreferences(context, 1)
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
android:defaultValue="true"
|
||||
android:summaryOff="@string/handheld_enabled"
|
||||
android:summaryOn="@string/docked_enabled"
|
||||
app:key="operation_mode"
|
||||
app:key="is_docked"
|
||||
app:title="@string/use_docked" />
|
||||
<emu.skyline.preference.CustomEditTextPreference
|
||||
android:defaultValue="@string/username_default"
|
||||
|
Loading…
Reference in New Issue
Block a user