Windowed/Fullscreen with "Bumblebee"

BlitzMax Forums/BlitzMax Programming/Windowed/Fullscreen with "Bumblebee"

Derron(Posted 2014) [#1]
I got a bug report from a user of our game TVTower
https://github.com/GWRon/TVTower


He complained that switching from fullscreen to windowed destroys his desktop resolution. As it is working for me (he: Ubuntu 14.04, me: Lint 16 so basically Ubuntu 14.04 too) I asked for further details: He is using "Bumblebee", means he uses a hybrid system of multiple gpu, a slower one and a better one. In his case one AMD and one Nvidia.

According to his description, "Bumblebee" uses an own configuration file.


So: does anyone of you use Bumblebee too?


Another problem is this: when switching to fullscreen on an extended-screen-setup (2 screens which extend the desktop so you could move your mouse from one screen to the other one or more apps from one screen in the middle of both etc.) the setup switches to cloning. Which means: instead of seeing the app only on one screen in fullscreen, I then see the app cloned on each of the screens.

This happens for me on Ubuntu 14.04 but might happen on other OS too.


Ideas?


bye
Ron


Brucey(Posted 2014) [#2]
Another problem is this...

Comparing SDL's code (which doesn't have this problem) to BlitzMax's, it seems that SDL is doing *a lot* of extra stuff with X11. Presumably, some of that stuff gets around the problems you are having in BlitzMax.

Maybe we need to "borrow" some of the SDL implementation? :-)

I tend to use fullscreen-windowed for most Linux games on my dual-screen setup.


Derron(Posted 2014) [#3]
You mean virtual-resolution or do you mean "other games" (not ones you code)? I thought of this as alternative too.


bye
ron


markcw(Posted 2014) [#4]
Well I have noticed in ubuntu when there is a crash in fullscreen mode Max doesn't restore the original desktop resolution so I always use windowed mode. The same thing happened in Blitz3d under wine.


Derron(Posted 2014) [#5]
That crashes-thing is happening for most of the games. Even some famous ones like "ZAZ" (Zaz aint Zuma) have problems restoring the resolution on ending the app.


As the problem isn't only with bumblebee but also "extended setups" I think it is something which brucey thinks of: the initialization of the x-window.


bye
Ron


dawlane(Posted 2014) [#6]
The last time I had these problems it was down to the repositories driver-updates being installed and the only way I got round it was a custom org.conf file. I agree that the initialisation code, etc needs updating.


Derron(Posted 2014) [#7]
I happily accept "ready to paste" code :D


Do you happen to rememberwhat you have to change in the xorg.conf?

bye
Ron


dawlane(Posted 2014) [#8]
@Derron: I had to set the server layout to xinerama with separate xscreens and disable composite rendering. Not fun. But the neighbours kid learned a few words by the end of the day.
I did a half hearted attempt today with Mint 17 and Cinnamon to solve the problem, but it too bloody warm to think.

Edit: Here's a link that should give you some idea https://help.ubuntu.com/community/XineramaHowTo

I agree that the initialisation code, etc needs updating.
Scratch that. The whole of the X side of things need an update. I'm sure some of those X library functions in Max are depreciated.


Derron(Posted 2014) [#9]
Don't know if we could "borrow" code from sdl without much trouble/influence to other code?

I think it is the same direction like the addition of the "windowed" fullscreen mode from dan_upright:
http://www.blitzmax.com/Community/posts.php?topic=102797


Dunno if this is one of the reasons why the startup is way faster than with Monkey (as others report, did not check that rumor).


@Link
I just linked it to the user as I do not have access to "bumblebee" and also am not that hmm "into" x11-coding. Seems my knowledge is way more limited than I thought before ;D.


bye
Ron


Brucey(Posted 2014) [#10]
I think it is the same direction like the addition of the "windowed" fullscreen mode from dan_upright

...which I still need to implement. Thanks for reminding me :-)