Refactor SdlGamepadKeyNavigation to avoid multiple reinitializations of SDL
This commit is contained in:
parent
03c0be0720
commit
d2cff86c97
7 changed files with 27 additions and 45 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue