Change download directory for apk file

This commit is contained in:
drdev
2014-08-23 19:19:39 +00:00
parent f9ce33310b
commit cc8e3f41f6
7 changed files with 36 additions and 25 deletions

View File

@@ -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/";
}
}
}