mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +00:00
Ports: Unbreak SDL2 by using GUI::Application::create()
Commit 1a97382
introduced the fallible GUI::Application::create() and
removed GUI::Application::construct() breaking the SDL2 port, let's
update it to use the fallible version.
This commit is contained in:
parent
cf52542fcf
commit
4c17f22735
1 changed files with 2 additions and 1 deletions
|
@ -921,6 +921,7 @@ index 0000000000000000000000000000000000000000..f26040845dd05f425ba464af385e133c
|
||||||
+# include <LibGUI/Widget.h>
|
+# include <LibGUI/Widget.h>
|
||||||
+# include <LibGUI/Window.h>
|
+# include <LibGUI/Window.h>
|
||||||
+# include <LibGfx/Bitmap.h>
|
+# include <LibGfx/Bitmap.h>
|
||||||
|
+# include <LibMain/Main.h>
|
||||||
+# include <dlfcn.h>
|
+# include <dlfcn.h>
|
||||||
+
|
+
|
||||||
+static SDL_Scancode scancode_map[] = {
|
+static SDL_Scancode scancode_map[] = {
|
||||||
|
@ -1125,7 +1126,7 @@ index 0000000000000000000000000000000000000000..f26040845dd05f425ba464af385e133c
|
||||||
+ dbgln("{}: Initialising SDL application", __FUNCTION__);
|
+ dbgln("{}: Initialising SDL application", __FUNCTION__);
|
||||||
+
|
+
|
||||||
+ if (!g_app) {
|
+ if (!g_app) {
|
||||||
+ g_app = GUI::Application::construct(0, nullptr);
|
+ g_app = MUST(GUI::Application::create(Main::Arguments {}));
|
||||||
+ g_app->set_quit_when_last_window_deleted(false);
|
+ g_app->set_quit_when_last_window_deleted(false);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue