mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-10 17:56:26 +00:00
Refactor SdlGamepadKeyNavigation to avoid multiple reinitializations of SDL
This commit is contained in:
@@ -350,7 +350,6 @@ int main(int argc, char *argv[])
|
||||
qmlRegisterType<ComputerModel>("ComputerModel", 1, 0, "ComputerModel");
|
||||
qmlRegisterType<AppModel>("AppModel", 1, 0, "AppModel");
|
||||
qmlRegisterType<StreamingPreferences>("StreamingPreferences", 1, 0, "StreamingPreferences");
|
||||
qmlRegisterType<SdlGamepadKeyNavigation>("SdlGamepadKeyNavigation", 1, 0, "SdlGamepadKeyNavigation");
|
||||
qmlRegisterUncreatableType<Session>("Session", 1, 0, "Session", "Session cannot be created from QML");
|
||||
qmlRegisterSingletonType<ComputerManager>("ComputerManager", 1, 0,
|
||||
"ComputerManager",
|
||||
@@ -367,6 +366,12 @@ int main(int argc, char *argv[])
|
||||
[](QQmlEngine*, QJSEngine*) -> QObject* {
|
||||
return new SystemProperties();
|
||||
});
|
||||
qmlRegisterSingletonType<SdlGamepadKeyNavigation>("SdlGamepadKeyNavigation", 1, 0,
|
||||
"SdlGamepadKeyNavigation",
|
||||
[](QQmlEngine*, QJSEngine*) -> QObject* {
|
||||
return new SdlGamepadKeyNavigation();
|
||||
});
|
||||
|
||||
|
||||
#ifndef Q_OS_WINRT
|
||||
// Use the dense material dark theme by default
|
||||
|
||||
Reference in New Issue
Block a user