aboutsummaryrefslogtreecommitdiff
path: root/src/system
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-09-20 17:28:35 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-09-20 17:34:25 +0200
commit3eef29c327abd46e73c0a4d5b1c186dd7d3878b2 (patch)
treef08cfce76affcc84a6563b9ed5c0e8c610345d6f /src/system
parent8f9737b776bf98d0686a2f11685d1e307b2ef390 (diff)
downloadrts-3eef29c327abd46e73c0a4d5b1c186dd7d3878b2.tar.gz
menu: Implement join_menu
Diffstat (limited to 'src/system')
-rw-r--r--src/system/CMakeLists.txt2
-rw-r--r--src/system/ps1/src/init.c4
-rw-r--r--src/system/sdl-1.2/src/system.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/src/system/CMakeLists.txt b/src/system/CMakeLists.txt
index 011aee6..4c315b9 100644
--- a/src/system/CMakeLists.txt
+++ b/src/system/CMakeLists.txt
@@ -1,5 +1,5 @@
set(inc "inc")
-set(privdeps gfx sfx)
+set(privdeps gfx sfx net)
if(PS1_BUILD)
set(src "ps1/src/init.c")
diff --git a/src/system/ps1/src/init.c b/src/system/ps1/src/init.c
index 4c30fbd..4ad12c2 100644
--- a/src/system/ps1/src/init.c
+++ b/src/system/ps1/src/init.c
@@ -1,4 +1,5 @@
#include <gfx.h>
+#include <net.h>
#include <sfx.h>
#include <system.h>
#include <psx.h>
@@ -20,13 +21,14 @@ void system_deinit(void)
{
gfx_deinit();
sfx_deinit();
+ net_deinit();
}
int system_init(void)
{
SetVBlankHandler(vblank);
- if (gfx_init() || sfx_init())
+ if (gfx_init() || sfx_init() || net_init())
return -1;
return 0;
diff --git a/src/system/sdl-1.2/src/system.c b/src/system/sdl-1.2/src/system.c
index 24c3e18..bff5e4f 100644
--- a/src/system/sdl-1.2/src/system.c
+++ b/src/system/sdl-1.2/src/system.c
@@ -1,5 +1,6 @@
#include <gfx.h>
#include <sfx.h>
+#include <net.h>
#include <system.h>
#include <SDL.h>
#include <stdio.h>
@@ -19,6 +20,7 @@ void system_deinit(void)
{
gfx_deinit();
sfx_deinit();
+ net_deinit();
SDL_Quit();
}
@@ -29,7 +31,7 @@ int system_init(void)
fprintf(stderr, "SDL_Init: %s\n", SDL_GetError());
goto failure;
}
- else if (gfx_init() || sfx_init())
+ else if (gfx_init() || sfx_init() || net_init())
goto failure;
SDL_WM_SetCaption("rts", NULL);