Rename operationMode setting to isDocked

This commit is contained in:
lynxnb 2022-01-10 23:14:40 +01:00 committed by ◱ Mark
parent 69cf25b1a7
commit 3b27540250
6 changed files with 6 additions and 6 deletions

View File

@ -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");

View File

@ -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

View File

@ -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);
}

View File

@ -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
}

View File

@ -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)

View File

@ -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"