mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
update windowlistener
- use Lwjgl3WindowAdapter, should fix some issue for LWJGL3
This commit is contained in:
@@ -118,32 +118,7 @@ public class Main {
|
||||
config.setWindowedMode(Config.instance().getSettingData().width, Config.instance().getSettingData().height);
|
||||
}
|
||||
config.setTitle("Forge");
|
||||
config.setWindowListener(new Lwjgl3WindowListener() {
|
||||
@Override
|
||||
public void created(Lwjgl3Window lwjgl3Window) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void iconified(boolean b) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void maximized(boolean b) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void focusLost() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void focusGained() {
|
||||
|
||||
}
|
||||
|
||||
config.setWindowListener(new Lwjgl3WindowAdapter(){
|
||||
@Override
|
||||
public boolean closeRequested() {
|
||||
//use the device adpater to exit properly
|
||||
@@ -151,17 +126,8 @@ public class Main {
|
||||
Forge.exit(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void filesDropped(String[] strings) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshRequested() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
if (desktopMode)
|
||||
config.setHdpiMode(HdpiMode.Logical);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user