EDIT: Oops, I wanted to post this to Development Discussion and can't seem to find a way to delete or move it. Sorry.
Hello, I am currently trying to write some code for the functionality to start/stop/change games via the socket-api https://github.com/ProjectRevoTPP/dolphin (don't look at the code pls). What I want is to receive something like "BOOT path/to/game.iso" via a socket (so obviously different thread) and have dolphin boot up a new game.
I tried several things and I am out of ideas since I am not too familiar with the Dolphin code or wx.
My first attempt to change games was to quit the current game (if running) and just start a new one. Quitting is easy, using the Core interface I can just Stop() and the gui will notice and everything is fine. Starting however is indefinetely harder.
I can't just "boot" a new game, like with the BootManager interface's BootCore. new windows and more gui stuff need to be set up, and exactly that is done by the main frame's BootCore method. However, I am calling it from another thread and I highly believe this causes the following issue: When I call that method the game boots fine, but the gui becomes unresponsive. Windows (the os) marks my windows (the graphical user interface parts) as "unresponsive" (can't move, click, anything), although the game is actually running fine.
I then tried not to call these methods from another thread, but rather schedule wx events to start a game. For that I used main_frame->GetEventHandler()->AddPendingEvent(event). I tried several events, the event I wanted to work was wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_PLAY) but I don't quite know what I am doing at this point and all those events had no effect whatsoever.
My third attempt was to not bother with the gui at all. So for changing a game I used the DVDInterface to switch the iso and then pressed the reset button. This works for some games, but not for all. For example Mario party 4 will just freeze forever when trying to reset with another iso/disc inserted. Switching the iso from Mario Party 6 to 4 while 6 is running works, although not resetting fast enough can crash or freeze the game too. Why isn't the game noticing it when I switch the disc but continues to read from it? Isn't the DVDInterface supposed to fire interrupts for "the lid opening" and such? Anyway, this didn't work either.
So now I am out of ideas. Please give me a hint how I can accomplish this.
Hello, I am currently trying to write some code for the functionality to start/stop/change games via the socket-api https://github.com/ProjectRevoTPP/dolphin (don't look at the code pls). What I want is to receive something like "BOOT path/to/game.iso" via a socket (so obviously different thread) and have dolphin boot up a new game.
I tried several things and I am out of ideas since I am not too familiar with the Dolphin code or wx.
My first attempt to change games was to quit the current game (if running) and just start a new one. Quitting is easy, using the Core interface I can just Stop() and the gui will notice and everything is fine. Starting however is indefinetely harder.
I can't just "boot" a new game, like with the BootManager interface's BootCore. new windows and more gui stuff need to be set up, and exactly that is done by the main frame's BootCore method. However, I am calling it from another thread and I highly believe this causes the following issue: When I call that method the game boots fine, but the gui becomes unresponsive. Windows (the os) marks my windows (the graphical user interface parts) as "unresponsive" (can't move, click, anything), although the game is actually running fine.
I then tried not to call these methods from another thread, but rather schedule wx events to start a game. For that I used main_frame->GetEventHandler()->AddPendingEvent(event). I tried several events, the event I wanted to work was wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_PLAY) but I don't quite know what I am doing at this point and all those events had no effect whatsoever.
My third attempt was to not bother with the gui at all. So for changing a game I used the DVDInterface to switch the iso and then pressed the reset button. This works for some games, but not for all. For example Mario party 4 will just freeze forever when trying to reset with another iso/disc inserted. Switching the iso from Mario Party 6 to 4 while 6 is running works, although not resetting fast enough can crash or freeze the game too. Why isn't the game noticing it when I switch the disc but continues to read from it? Isn't the DVDInterface supposed to fire interrupts for "the lid opening" and such? Anyway, this didn't work either.
So now I am out of ideas. Please give me a hint how I can accomplish this.