Emulator Issues #2078
closedPlay button not active if DefaultGCM and LastFilename not set
0%
Description
What steps will reproduce the problem?
- Make sure DefaultGCM and LastFilename are not set in Dolphin.ini
- Start Dolphin and select an ISO in the game list.
- The play button does not become active. It is still possible to play a
game by double clicking on the ISO in the game list, but could be confusing
to the user.
This will happen, for example, in the case that this is the first run of
Dolphin and no ISO path has been selected, and in this case it happens
after an ISO path is added.
I have an attached a patch that seems to fix this issue.
Updated by glennricster almost 15 years ago
You may notice in the patch that I used the EVT_LEFT_DOWN event, which previously was
conflicting with multiple selections. However, I think that I avoided that by
proppigating the event, and only doing anything if there are no previous selections.
So far I have seen no interference with multiple selections.
Updated by skidau almost 15 years ago
Thanks, glennricster. This does fix the Play appearing on new installs. However,
after stopping a game, the Play button stays disabled. The Play button should be
enabled.
Updated by glennricster almost 15 years ago
Okay, I will see what I can do about that.
Updated by glennricster almost 15 years ago
Actually, I am not quite sure what you mean. When I start a game and stop it, the
play button is enabled. Also, while the game is active the play button is enabled to
pause the game.
Updated by skidau almost 15 years ago
I started a fresh install of Dolphin (no Default ISO and no last filename). I select
a game from the game list and start it (I think with the play button). I press esc
or the stop button. The game list reappears but the Play and Stop buttons are disabled.
I think I also tried it with a Default ISO with the same result.
Updated by glennricster almost 15 years ago
Hmm, I tried the same thing and after hitting the stop button, the game closes, and
the play button is enabled.
Updated by skidau almost 15 years ago
After the game closes and before you have click the gamelist again, the Play button
is enabled for you?
Updated by glennricster almost 15 years ago
Yeah, after the game closes without doing anything the play button is enabled. At
least in windows that is the case. In linux I have been unable to test this as, for
some reason, the program segmentation faults when I close a game on the first run.
Updated by glennricster almost 15 years ago
Ok, so I think I am seeing something like what you are seeing. If I start and stop a
game, hit refresh, and start and stop a game, then after that the play button is not
enabled as it should be. I will see if I can fix that.
Updated by hrydgard almost 15 years ago
- Status changed from New to Accepted
When you've got it figured out, feel free to commit the fix, I've added you.
BTW it would be great if you could make game_loading not global somehow.
Updated by glennricster almost 15 years ago
Ok, thanks. I will work on making game_loading not glabal. I don't think that
should be too hard. It is only used in a couple of functions.
Updated by glennricster almost 15 years ago
Actually, is the game_loading variable even needed? During the entire time that a
game is running the m_GameListCtrl->IsEnabled() should return false, and if it is not
running it should return true. That should probably be used instead.
Updated by skidau almost 15 years ago
"game_loading = true" is the time between when the user selects to play the game and
the time when the game is loaded (check the EmuThread in Core.cpp). During this
time, the play button must be disabled. It prevents the user from double clicking
the Play button and confusing the emulator.
Updated by glennricster almost 15 years ago
I realize the intent of the variable. I was just saying that I think there may be a
better way to determine if the game is loading or not. However, the problem with
what I said before is that the game_loading variable is used in CFrame::UpdateGUI to
determine when to reenable the game list ctrl. Making my comment invalid.
Updated by glennricster almost 15 years ago
I have found the problem, and I am trying to find a way to remedy it. The problem is
with the checking of Core::GetStartupParameter().m_strFilename.empty() on line 1069
of FrameTools.cpp. m_strFilename is set whenever a game is run. So on first run if
a game is automatically run (for example by passing "--elf=filename" from the command
line), m_strFilename is set and the check on line 1069 does the correct thing at the
beginning and disables the play button, but the play button is disabled after closing
the game because the m_strFilename is still set. If a game is not run automatically,
m_strFilename is also set when the game is stopped, and the play button is disabled.
If an ISO is selected in the game list, the play button is enabled later in the
update gui function still, but otherwise the play button remains disabled.
Updated by skidau almost 15 years ago
Thanks for investigating this one.
The play button should not be disabled if m_strFilename is set after closing (i.e.
when the gamelist is on the screen). Maybe a check for those conditions in UpdateGUI
can fix this last issue.
Updated by glennricster almost 15 years ago
One problem is that if a game is started automatically the gamelist is still on the
screen while the game is running, and so checking for gamelist won't work. Of course
the gamelist shouldn't be showing at that time so that is another problem.
Updated by glennricster almost 15 years ago
One solution that seems to work is to clear the m_strFilename at the end of
CBoot::Bootup in Source/Core/Core/Boot/Boot.cpp. But I want to investigate a little
bit first to see if that is safe to do.
Updated by lawrence29reyome almost 15 years ago
http://forums.dolphin-emu.com/thread-6744.html
I have included the patch in a recompiled 4922, tested and works
Updated by glennricster almost 15 years ago
- Status changed from Accepted to Fixed
This issue was closed by revision r4923.