mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Change download directory for apk file
This commit is contained in:
@@ -5,7 +5,7 @@ import com.badlogic.gdx.backends.lwjgl.LwjglClipboard;
|
||||
|
||||
import forge.Forge;
|
||||
import forge.assets.AssetsDownloader;
|
||||
import forge.interfaces.INetworkConnection;
|
||||
import forge.interfaces.IDeviceAdapter;
|
||||
import forge.util.FileUtil;
|
||||
import forge.util.Utils;
|
||||
|
||||
@@ -16,14 +16,14 @@ public class Main {
|
||||
FileUtil.ensureDirectoryExists(assetsDir);
|
||||
}
|
||||
|
||||
new LwjglApplication(Forge.getApp(new LwjglClipboard(), new DesktopNetworkConnection(),
|
||||
new LwjglApplication(Forge.getApp(new LwjglClipboard(), new DesktopAdapter(),
|
||||
assetsDir, null), "Forge", Utils.DEV_SCREEN_WIDTH, Utils.DEV_SCREEN_HEIGHT);
|
||||
}
|
||||
|
||||
private static class DesktopNetworkConnection implements INetworkConnection {
|
||||
private static class DesktopAdapter implements IDeviceAdapter {
|
||||
//just assume desktop always connected to wifi
|
||||
@Override
|
||||
public boolean isConnected() {
|
||||
public boolean isConnectedToInternet() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -31,5 +31,10 @@ public class Main {
|
||||
public boolean isConnectedToWifi() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDownloadsDir() {
|
||||
return System.getProperty("user.home") + "/Downloads/";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user