CommonHostInterface: Add a method to get top-level window handle

This commit is contained in:
Connor McLaughlin
2020-12-29 16:29:14 +10:00
parent a894b295b6
commit a3e4c61a0b
7 changed files with 35 additions and 9 deletions

View File

@ -32,6 +32,8 @@ int main(int argc, char* argv[])
if (!host_interface->ParseCommandLineParameters(argc, argv, &boot_params))
return EXIT_FAILURE;
std::unique_ptr<MainWindow> window = std::make_unique<MainWindow>(host_interface.get());
if (!host_interface->Initialize())
{
host_interface->Shutdown();
@ -40,8 +42,7 @@ int main(int argc, char* argv[])
return EXIT_FAILURE;
}
std::unique_ptr<MainWindow> window = std::make_unique<MainWindow>(host_interface.get());
window->show();
window->initializeAndShow();
// if we're in batch mode, don't bother refreshing the game list as it won't be used
if (!host_interface->inBatchMode())