Skip to main content
gamedev.net
🔒 Locked

[java] Fullscreen in Linux

Started by Last Attacker 7 replies 950+ views
Original Post
Last Attacker
Last Attacker
Hey, I've used someone's code for my game in Java to change to full screen, which works perfectly in windows but not in Linux (I have SuSE 9.1). It uses the DeviceMode class or something and before showing any code, I'm hoping if you guys could tell me if there is some bug with Java in Linux about the changing to full screen. When I run my game it works but it just resizes the Frame the whole screen without changing the resolution to what I need. Its currently at 1024x768 60Hz 16-bit and I want it at 640x480 60Hz 16-bit. Any ideas?
"Take delight in the Lord and He will give you your heart's desires" - Psalm 37:4My Blog
Chaoslab
Chaoslab
Try looking for a command in linux that changes (and hopefully restores) desktop / screen resoution and make that part of your shell script to run the game.

It is a real pain that this problem is still around and has been so for quite a few years.
ujhkfkfk
C-Junkie
C-Junkie
Are you guys serious? there's no java library to change the screen resolution?
seanw
seanw
I don't have a solution, but just wanted to add that I have also had the same problem under Linux and couldn't find an answer. I've tried playing with things like AWT security permissions, but just can't find anything that works. I can change the resolution and go into fullscreen in Windows fine, but the same code on Linux doesn't work. I can't seem to find anything on google about this issue either so never found a fix.
capn_midnight
capn_midnight
Creating fullscreen apps in java on linux other than a completely maximized frame is not possible on linux. In fact, I think it's only possible on windows. As for changing the screen resolution, I doubt that is possible, either.
markr
markr
Linux applications which use X can change the resolution, giving themselves fullscreen at any res supported using the XVidMode extension which is present on almost all Linux systems.

SDL uses this I believe.

Likewise, apps which use openGL often use it.

It doesn't surprise me that Sun don't know how to do this, because they don't seem to know a lot of things.

Mark
jsgcdude
jsgcdude
Quote:
It doesn't surprise me that Sun don't know how to do this, because they don't seem to know a lot of things.


This is an uniformed statement. Sun doesn't develop java on linux so how can you blame them for not implementing a feature? Blame the Blackdown people or other java implementors.
------------------

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.