Project

General

Profile

Actions

Emulator Issues #1673

closed

DX9 Pluggin Switching to/from fullscreen closes dolphin

Added by gstkein over 14 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What steps will reproduce the problem?

  1. Start dolphin with DX9 video pluggin
  2. Start a game (I've tried Zelda Twilight Princess for gamecube)
  3. Press ESC key

What is the expected output? What do you see instead?
Dolphin closes.

What version of the product are you using? On what operating system?
Tried r4525 and r4588.

Please provide any additional information below.
It didn't happen on r4485


Related issues 1 (0 open1 closed)

Has duplicate Emulator - Emulator Issues #1832: Alt-tabbing out of fullscreen crashes the emulatorDuplicate

Actions
Actions #1

Updated by Anonymous over 14 years ago

  • Status changed from New to Questionable

er, isn't this the behavior now?

Actions #2

Updated by luisr142004 over 14 years ago

closes the game or dolphin entirely? o_O, cuz if it's the game then it's normal :P

Actions #3

Updated by gstkein over 14 years ago

I think it closes dolphin entirely, as if one just killed the process. I'll verify it
once I go back home. I don't think that's the behavior it's supposed to have. How do
you switch from fullscreen to window with DX9 if not by pressing ESC?

Actions #4

Updated by wespipes69 over 14 years ago

I get crashing when leaving fullscreen in recent revisions (DX plugin). It needs to
go back to how it was...your in fullscreen, pressing ESC or alt+enter simply
switches to windowed, once windowed you can alt+enter to return to full. Pressing
ESC should not kill the entire emulator...or crash of course! :)Compare with OpenGl
and you'll see what I'm talking about. Being a fullscreen user, this is pretty
irratating.

Actions #5

Updated by gstkein over 14 years ago

It is the game wich closes when pressing ESC key, not dolphin, yet you can´t switch
from fullscreen to window or viceversa. And alt + enter doesn´t do that either.

Actions #6

Updated by luisr142004 over 14 years ago

  • Status changed from Questionable to Accepted

wespipes69: yea i've noticed dolphin crash when closing the game (either it be
fullscreen or windowed), only happens when the dual-core option is enabled >_>

and well gstkein, you can use render to main for going fullscreen in the
meanwhile :P (till going fullscreen is fixed :))

Actions #7

Updated by gstkein over 14 years ago

I'll try that. I'm using dual core by the way. PS: Thanks for the tip.

Actions #8

Updated by Anonymous over 14 years ago

  • Status changed from Accepted to Questionable

should be fixed now?
someone confirm please :)

Actions #9

Updated by gstkein over 14 years ago

Sorry, at r4652 it still happens. I have an ati radeon hd 4800 in case the info is
usefull.

Actions #10

Updated by wespipes69 over 14 years ago

Yep, very unstable still. Esc always crashes - Alt+enter usually does as well,
though if it doesn't, it kills the entire emu which should not be the case - opengl
just returns to windowed mode.

Actions #11

Updated by fjavier2k over 14 years ago

Tried with r4696. Dolphin still crashes after pressing ESC key with DX plugin. I have
an ati radeon hd 4850.

Actions #12

Updated by Migs351 over 14 years ago

I don't know how many times I can point out the fact that it's CODED to close the
emu, but here it is again.... look at issue 1470 ....

Look at the code of EmuWindow.cpp,(
http://code.google.com/p/dolphin-emu/source/browse/trunk/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp
) from lines 60 to 80. Pressing escape does a SendMessage(m_hWnd, WM_CLOSE, 0, 0);

Pressing ALT + ENTER Does the following:
DestroyWindow(hWnd);
PostQuitMessage(0);
ExitProcess(0);

Actions #13

Updated by Migs351 over 14 years ago

BTW, my patch is very ugly, and doesn't work very well anymore with the latest
additions to EmuWindow. I created this a long time ago, this needs a real dev to
look at it and get it to work properly.

Actions #14

Updated by luisr142004 over 14 years ago

Issue 1832 has been merged into this issue.

Actions #15

Updated by Migs351 over 14 years ago

I decided to look at this again, and if you followed any of issue 1470 ... I
completely trashed that crappy patch and decided to go another route, much easier
mind you... and I got it to work from Windowed to Full (very lightly tested)

For the devs...

I simply created a ToggleFullscreen() in the EmuWindow class and removed the code I
specified above and replaced it with a "ToggleFullscreen();" and "return 0;"

void ToggleFullscreen()
{
if (m_hParent == NULL)
{
int w_temp = 640; // In case the resolution
int h_temp = 480; // isn't found in the config
if (g_ActiveConfig.bFullscreen)
{
// In Full Screen, going to Windowed
Renderer::Shutdown();
g_Config.bFullscreen = false;
ShowCursor(TRUE);
sscanf(g_Config.cInternalRes, "%dx%d", &w_temp, &h_temp);
SetSize(w_temp, h_temp);
Renderer::Init();
Show();
}
else
{
// In Windowed, going to Full Screen
Renderer::Shutdown();
g_Config.bFullscreen = true;
ShowCursor(FALSE);
sscanf(g_Config.cFSResolution, "%dx%d", &w_temp, &h_temp);
SetSize(w_temp, h_temp);
Renderer::Init();
Show();
}
}
}

But for some reason doing this from Full to windowed is problematic... it complains
that it can't initialize the device, which happens when it can't do a dev->Create
properly... but I don't understand why... Everything in the above function is the
same in both if's aside from the fullscreen config setting changing and everything is
completely re-initialized (All textures, shaders, vertexmanager, all of that, and
both Renderer AND the D3D Device are getting a shutdown/re-create/re-init) by doing a
full renderer shutdown/init...

The emulation can start in either mode just fine... The only 2 differences from
Windowed to Fullscreen is the resolution and the true/false of fullscreen...

I'm boggled as to why it works going to Fullscreen but not going to windowed, I'm
missing something here... I'm guessing that the window size and/or resolution isn't
getting detected right when it polls the client window size and it's trying to create
the device in an invalid resolution or mode... But I'm going to play with it and see
if I can get it to work right...

Actions #16

Updated by sl1nk3.s over 14 years ago

  • Status changed from Questionable to Fixed

fixed in r4779, btw thanks Migs351 for taking a look at it :), we already had code to
do this in the OGL plugin tho, so it was easily ported to DX.

Actions

Also available in: Atom PDF