diff --git a/project/jni/application/xserver-debian/AndroidAppSettings.cfg b/project/jni/application/xserver-debian/AndroidAppSettings.cfg index cddd8df50..06f3ceded 100644 --- a/project/jni/application/xserver-debian/AndroidAppSettings.cfg +++ b/project/jni/application/xserver-debian/AndroidAppSettings.cfg @@ -7,10 +7,10 @@ AppName="Debian" AppFullName=com.cuntubuntu # Application version code (integer) -AppVersionCode=141008 +AppVersionCode=141120 # Application user-visible version name (string) -AppVersionName="14.10.08" +AppVersionName="14.11.20" # Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...' # If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu @@ -18,7 +18,7 @@ AppVersionName="14.10.08" # If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir - # these files are put inside .apk package by build system # Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS -AppDataDownloadUrl="!!System image|:data.tar.gz:http://sourceforge.net/projects/libsdl-android/files/ubuntu/14.05.01/dist-debug-wheezy-proot-.tar.gz/download^!!XSDL data files|:data-1.tar.gz:data-1.tgz^!!XSDL fonts|:DroidSansMono.ttf:DroidSansMono.ttf^!!Postinstall script|:postinstall.sh:postinstall2.sh^!!Update|:update1.tar.gz:update1.tgz^!!Update|:update2.tar.gz:update2-.tgz^!!Update|:update3.tar.gz:update3.tgz^!!Update|:update4.tar.gz:update4.tgz" +AppDataDownloadUrl="!!System image|:data.tar.gz:http://sourceforge.net/projects/libsdl-android/files/ubuntu/14.05.01/dist-debug-wheezy-proot-.tar.gz/download^!!XSDL data files|:data-1.tar.gz:data-1.tgz^!!XSDL fonts|:DroidSansMono.ttf:DroidSansMono.ttf^!!Postinstall script|:postinstall.sh:postinstall2.sh^!!Update|:update1.tar.gz:update1.tgz^!!Update|:update2.tar.gz:update2-.tgz^!!Update|:update3.tar.gz:update3.tgz^!!Update|:update4.tar.gz:update4.tgz^!!Update|:update5.tar.gz:update5-.tgz" # Reset SDL config when updating application to the new version (y) / (n) ResetSdlConfigForThisVersion=n diff --git a/project/jni/application/xserver-debian/AndroidData/update2-armeabi-v7a.tgz b/project/jni/application/xserver-debian/AndroidData/update2-armeabi-v7a.tgz index 52878fc6e..757c5a0f8 100644 Binary files a/project/jni/application/xserver-debian/AndroidData/update2-armeabi-v7a.tgz and b/project/jni/application/xserver-debian/AndroidData/update2-armeabi-v7a.tgz differ diff --git a/project/jni/application/xserver-debian/AndroidData/update2-x86.tgz b/project/jni/application/xserver-debian/AndroidData/update2-x86.tgz index 22da303ae..ac3e546b1 100644 Binary files a/project/jni/application/xserver-debian/AndroidData/update2-x86.tgz and b/project/jni/application/xserver-debian/AndroidData/update2-x86.tgz differ diff --git a/project/jni/application/xserver-debian/AndroidData/update5-armeabi-v7a.tgz b/project/jni/application/xserver-debian/AndroidData/update5-armeabi-v7a.tgz new file mode 100644 index 000000000..dd4051d2f Binary files /dev/null and b/project/jni/application/xserver-debian/AndroidData/update5-armeabi-v7a.tgz differ diff --git a/project/jni/application/xserver-debian/AndroidData/update5-x86.tgz b/project/jni/application/xserver-debian/AndroidData/update5-x86.tgz new file mode 100644 index 000000000..f019eb233 Binary files /dev/null and b/project/jni/application/xserver-debian/AndroidData/update5-x86.tgz differ diff --git a/project/jni/application/xserver-debian/xserver b/project/jni/application/xserver-debian/xserver index 38269b698..ce2611df1 160000 --- a/project/jni/application/xserver-debian/xserver +++ b/project/jni/application/xserver-debian/xserver @@ -1 +1 @@ -Subproject commit 38269b6980bccef6340f9c9f04e6e3ec059d07b0 +Subproject commit ce2611df1142b98a00ed261be30791f98e716d5b diff --git a/project/jni/application/xserver/gfx.c b/project/jni/application/xserver/gfx.c index 89f5eed7f..fd497133c 100644 --- a/project/jni/application/xserver/gfx.c +++ b/project/jni/application/xserver/gfx.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "gfx.h" @@ -298,7 +299,10 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i int x = 0, y = 0, i, ii; SDL_Event event; int res = -1, dpi = -1; + int customX = 1000, customY = 1000; + enum { MODE_CUSTOM = 11 }; char native[32] = "0x0", native56[32], native46[32], native36[32], native26[32]; + char custom[32] = "1000x1000"; int vertical = SDL_ListModes(NULL, 0)[0]->w < SDL_ListModes(NULL, 0)[0]->h; char cfgpath[PATH_MAX]; FILE * cfgfile; @@ -317,7 +321,7 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i { native, native56, native46, native36, native26, "1280x1024", "1280x960", "1280x720", - "1024x768", "800x600", "800x480", "640x480" + "1024x768", "800x600", "800x480", custom }; const int resVal[][2] = { {*resolutionW, *resolutionH}, @@ -326,7 +330,7 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i {(*resolutionW * 3 / 6) & ~0x3, (*resolutionH * 3 / 6) & ~0x3}, {(*resolutionW * 2 / 6) & ~0x3, (*resolutionH * 2 / 6) & ~0x3}, {1280,1024}, {1280,960}, {1280,720}, - {1024,768}, {800,600}, {800,480}, {640,480} + {1024,768}, {800,600}, {800,480}, {customX,customY} }; const char * fontsStr[] = { @@ -355,9 +359,10 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i cfgfile = fopen(cfgpath, "r"); if( cfgfile ) { - fscanf(cfgfile, "%d %d", &savedRes, &savedDpi); + fscanf(cfgfile, "%d %d %d %d", &savedRes, &savedDpi, &customX, &customY); fclose(cfgfile); } + sprintf(custom, "%dx%d", customX, customY); int counter = 3000, config = 0; Uint32 curtime = SDL_GetTicks(); @@ -424,7 +429,7 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i x = y; y = z; } - i = (y / (VID_Y/2)); + i = (y / (VID_Y/3)); ii = (x / (VID_X/4)); res = i * 4 + ii; __android_log_print(ANDROID_LOG_INFO, "XSDL", "Screen coords %d %d res %d\n", x, y, res); @@ -449,14 +454,27 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i renderString(resStr[i*4+ii], VID_X/8 + (ii*VID_X/4), VID_Y/6 + (i*VID_Y/3)); if( i == 0 && ii == 0 && !vertical ) renderString("native", VID_X/8, VID_Y/6 + VID_Y/12); + if( i == 2 && ii == 3 && !vertical ) + renderString("custom", VID_X/8 + (ii*VID_X/4), VID_Y/6 + VID_Y/12 + (i*VID_Y/3)); } //SDL_GetMouseState(&x, &y); //renderString("X", x, y); SDL_Delay(100); SDL_Flip(SDL_GetVideoSurface()); + if (res == MODE_CUSTOM) + { + SDL_ANDROID_SetScreenKeyboardHintMesage("WIDTHxHEIGHT"); + SDL_ANDROID_GetScreenKeyboardTextInput(custom, sizeof(custom) - 1); + sscanf(custom, "%dx%d", &customX, &customY); + } } *resolutionW = resVal[res][0]; *resolutionH = resVal[res][1]; + if (res == MODE_CUSTOM) + { + *resolutionW = customX; + *resolutionH = customY; + } while ( dpi < 0 ) { while (SDL_PollEvent(&event)) @@ -514,7 +532,7 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i cfgfile = fopen(cfgpath, "w"); if( cfgfile ) { - fprintf(cfgfile, "%d %d\n", res, dpi); + fprintf(cfgfile, "%d %d %d %d\n", res, dpi, customX, customY); fclose(cfgfile); } } @@ -598,10 +616,10 @@ void XSDL_generateBackground(const char * port, int showHelp, int resolutionW, i void XSDL_showServerLaunchErrorMessage() { - showErrorMessage( "Error: X server failed to launch,\n" - "because of stale Unix socket with non-existing path.\n\n" - "Power off your device and power it on,\n" - "and everything will work again."); + showErrorMessage( "Error: X server failed to launch.\n\n" + "this may happen because of SELinux,\n" + "or because installation was corrupted.\n" + "Either way, this app will not work, which is sad."); } void showErrorMessage(const char *msg)