I'm having an issue (Windows 7) where the entire game window will flash every couple seconds. Here's the minimum amount of code that reproduces the issue:
Code:
package Main;
import org.newdawn.slick.*;
public class Main extends BasicGame{
public Main() {
super("Flashing window issue");
}
@Override
public void init(GameContainer gc) throws SlickException {
}
@Override
public void update(GameContainer gc, int delta) throws SlickException {
}
@Override
public void render(GameContainer gc, Graphics g) throws SlickException {
}
public static void main(String[] args) throws SlickException {
AppGameContainer app = new AppGameContainer(new Main());
app.setDisplayMode(800, 600, false);
app.start();
}
}
What happens is that every couple seconds, the game window will disappear briefly and then reappear. Also, the window's rectangular icon in the taskbar disappears and then reappears (specifically it disappears immediately when the window does, and then when the window reappears milliseconds later, it slides back into place).
How do I fix this?
Thanks!