Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  code request: fullscreen/windowed switching  (Read 1717 times)
0 Members and 1 Guest are viewing this topic.
Offline bedelf

Junior Member




Are you suggesting coconuts migrate?


« Posted 2003-02-15 14:46:10 »

Anyone have a snippet of code that can move back and forth between windowed/fullscreen?

i.e.

public void setFullScreen(DisplayMode mode, int buffers) {
// etc
}

public void setWindowed(int width, int height) {
// etc
}

... elsewhere...
DisplayMode dm = new DisplayMode(640, 480, 32, 0);

setFullScreen(dm, 3);
...and later on..
setWindowed(640, 480);
...and later on..
setFullScreen(dm, 2);
...and later on..
setWindowed(800, 600);

etc..

The code I wrote that worked, is now broken (detailed in another post), so now I'm asking if someone has working code I could look at.
Offline bedelf

Junior Member




Are you suggesting coconuts migrate?


« Reply #1 - Posted 2003-02-26 08:03:21 »

Edit: I probably wont be putting the code back up till the fullscreen deadlock bug is fixed.

I also asked in this post why isDisplayChangeSupported() was returning false on win2k: you have to set a setFullscreenWindow(frame) before calling it.

meh.
Offline Backmask

Junior Member




586: The average IQ needed to understand a PC


« Reply #2 - Posted 2003-02-27 06:10:40 »

Quote
To make a long story short, isDisplayChangeSupported() is returning false and that revealed a bug in another method. So thats why it worked a long time ago, and then wasn't working now. Anyone know why thats returning false on win2k? :/


I can´t say why it does but I can verify that it also returns false on my win2k system. Had the similar problem that my code stopped to work, and it was becuase I had been writing the fullscreen mode change code on NT4 and when I tried it at home nothing worked. So I have disabled the check of  isDisplayChangeSupported() in my code.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Try the Free Demo of Revenge of the Titans

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (84 views)
2013-05-17 21:29:12

alaslipknot (92 views)
2013-05-16 21:24:48

gouessej (123 views)
2013-05-16 00:53:38

gouessej (117 views)
2013-05-16 00:17:58

theagentd (127 views)
2013-05-15 15:01:13

theagentd (114 views)
2013-05-15 15:00:54

StreetDoggy (158 views)
2013-05-14 15:56:26

kutucuk (180 views)
2013-05-12 17:10:36

kutucuk (180 views)
2013-05-12 15:36:09

UnluckyDevil (187 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.073 seconds with 20 queries.