Commits

wahrhaft  committed 53ab44c

move CoreVideo_Init() to RomOpen and add CoreVideo_Quit to RomClosed, should allow the plugin to start and stop multiple times

  • Participants
  • Parent commits 530b074

Comments (0)

Files changed (1)

File src/Main.cpp

     if (configDir)
     {
         SetConfigDir(configDir);
-        CoreVideo_Init();
 		ReadSettings();
         return M64ERR_SUCCESS;
     }
   romopen = FALSE;
   if (fullscreen && evoodoo)
     ReleaseGfx ();
+  CoreVideo_Quit();
 }
 
 BOOL no_dlist = TRUE;
 EXPORT int CALL RomOpen (void)
 {
   LOG ("RomOpen ()\n");
+  if (CoreVideo_Init() != M64ERR_SUCCESS)
+  {
+    WriteLog(M64MSG_ERROR, "Could not initialize video!");
+    return false;
+  }
+
   no_dlist = TRUE;
   romopen = TRUE;
   ucode_error_report = TRUE;    // allowed to report ucode errors