mupen64plus / mupen64plus-video-glide64mk2

Video plugin for Mupen64Plus 2.0 based on 10th anniversary release code from gonetz
28 stars 37 forks source link

Switching to fullscreen keeps old, windowed screen size #72

Open jclc opened 8 years ago

jclc commented 8 years ago

Not entirely sure if this is an issue with the plugin or m64py which I'm using, but entering fullscreen mode keeps the screen size of the non-fullscreen window and renders the rest of the screen black. The game screen is also not centered, but is displayed on the lower left corner. I assume this is an issue with the plugin, since rice scales the window size when switching to fullscreen - albeit stretching it to fit the monitor.

gen2brain commented 8 years ago

M64Py can resize window only with rice plugin, other plugins don't have ResizeVideoOutput implemented. You can disable video extension, the rom will start in SDL window then.

jclc commented 8 years ago

Thanks for the quick reply. Do you reckon it would be hard to implement? The comment for the function states this:

/******************************************************************
Function: ResizeVideoOutput
Purpose:  This function is called to force us to resize our output OpenGL window.
          This is currently unsupported, and should never be called because we do
          not pass the RESIZABLE flag to VidExt_SetVideoMode when initializing.
input:    new width and height
output:   none
*******************************************************************/

Would passing the RESIZABLE flag during initialisation break the plugin?

gen2brain commented 8 years ago

I am not the right person to answer your question, I only maintain frontend. As far as I understand, OpenGL context is lost after resize so it needs to be initialized again, at least with SDL version 1.

jclc commented 8 years ago

Are there any plans to migrate to SDL2? There is at least one other issue with SDL1.2 - fullscreen mode doesn't detect the correct monitor when using a multi-monitor setup. That's an issue inherent to all SDL1.2 applications. I would be willing to look into this at some point, if devs are fine with switching to SDL2 with this.

richard42 commented 8 years ago

jclc, what platform are you running on? I think with desktop PCs (linux/windows), switching to fullscreen should normally change the video card's output mode to the window's size (640x480, 800x600, etc) and it should fill the whole screen. This may not work on mobile platforms though.

We currently support both SDL1.2 and SDL2.. At some point in the future we will probably deprecate support for SDL1.2.

jclc commented 8 years ago

I'm running Linux. I would post a screenshot of how it looks, but m64py suddenly fails to run with various Python errors. When running mupen64plus from terminal, I don't even see a way to switch to fullscreen

Regarding SDL1.2 and SDL2, I've got both installed. Is there a way to force SDL2 and/or output monitor?

richard42 commented 8 years ago

You can use the "--fullscreen" and "--windowed" arguments with the mupen64plus-console-ui application to choose fullscreen or not when you start. You can use (default key binding) Alt-Enter to switch (with rice video) between fullscreen and windowed while running. I am running with SDL2, also on a linux box, built from latest source code. Our makefile defaults to building against SDL2 now. To build against SDL1.2, you need to build everything (m64p_build.sh) with options like: SDL_CFLAGS="-I/usr/include/SDL" SDL_LDLIBS="-lSDL -lpthread"

I don't think there's currently any way to force the output window on to a particular monitor.