Skip to content

Commit

Permalink
Merge commit 'a054a5f7f2dde31431cf890e421886faacdf5f54' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jun 30, 2022
2 parents d54931e + a054a5f commit 47c4324
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/main/ps2/SDL_ps2_main.c
Expand Up @@ -12,6 +12,8 @@
#include <sifrpc.h>
#include <iopcontrol.h>
#include <sbv_patches.h>
#include <ps2_fileXio_driver.h>
#include <ps2_memcard_driver.h>

#ifdef main
#undef main
Expand All @@ -24,11 +26,27 @@ static void prepare_IOP()
sbv_patch_disable_prefix_check();
}

static void init_drivers() {
init_fileXio_driver();
init_memcard_driver(true);
}

static void deinit_drivers() {
deinit_memcard_driver(true);
deinit_fileXio_driver();
}

int main(int argc, char *argv[])
{
int res;
prepare_IOP();
init_drivers();

res = SDL_main(argc, argv);

return SDL_main(argc, argv);
deinit_drivers();

return res;
}

#endif /* _EE */
Expand Down

0 comments on commit 47c4324

Please sign in to comment.