diff --git a/ReadMe.txt b/ReadMe.txt index a00778d..edfa85c 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -70,6 +70,7 @@ Version 2.0 (2020-11-XX) - Replaces the haptic feedback switch with a slider to adjust the vibration duration. - Fix transparency issue (RGB -> BGR). - Fix a printer issue from Christoph Gießelink's HP82240B Printer Simulator version 1.12. +- Fix the KML button Type 3 with a Background offset which was not display at the right location (Fix #15). Version 1.9 (2020-09-07) diff --git a/app/build.gradle b/app/build.gradle index 604f594..416ad76 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -81,11 +81,11 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.1' + implementation 'androidx.constraintlayout:constraintlayout:2.0.2' implementation 'androidx.preference:preference:1.1.1' implementation 'com.google.android.material:material:1.2.1' implementation 'androidx.documentfile:documentfile:1.0.1' - testImplementation 'junit:junit:4.13' + testImplementation 'junit:junit:4.13.1' androidTestImplementation 'androidx.test:runner:1.3.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 3dd6aa0..76a5cee 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,7 +3,7 @@ package="org.emulator.forty.eight"> - BGR). - Fix a printer issue from Christoph Gießelink's HP82240B Printer Simulator version 1.12. +- Fix the KML button Type 3 with a Background offset which was not display at the right location (Fix #15). Version 1.9 (2020-09-07) diff --git a/app/src/main/cpp/emu-jni.c b/app/src/main/cpp/emu-jni.c index 3329260..44762c7 100644 --- a/app/src/main/cpp/emu-jni.c +++ b/app/src/main/cpp/emu-jni.c @@ -29,7 +29,7 @@ static jobject mainActivity = NULL; jobject bitmapMainScreen = NULL; AndroidBitmapInfo androidBitmapInfo; enum DialogBoxMode currentDialogBoxMode; -LPBYTE pbyRomBackup; +LPBYTE pbyRomBackup = NULL; enum ChooseKmlMode chooseCurrentKmlMode; TCHAR szChosenCurrentKml[MAX_PATH]; TCHAR szKmlLog[10240]; diff --git a/app/src/main/cpp/win32-layer.c b/app/src/main/cpp/win32-layer.c index ae2e6d0..a1d5d38 100644 --- a/app/src/main/cpp/win32-layer.c +++ b/app/src/main/cpp/win32-layer.c @@ -1859,7 +1859,7 @@ BOOL PatBlt(HDC hdcDest, int x, int y, int w, int h, DWORD rop) { } x -= hdcDest->windowOriginX; - y -= hdcDest->windowOriginY; // TODO DSTINVERT in screen does not work!!! + y -= hdcDest->windowOriginY; HPALETTE palette = hdcDest->realizedPalette; if(!palette) diff --git a/app/src/main/java/org/emulator/forty/eight/MainActivity.java b/app/src/main/java/org/emulator/forty/eight/MainActivity.java index 09340d3..67fb21e 100644 --- a/app/src/main/java/org/emulator/forty/eight/MainActivity.java +++ b/app/src/main/java/org/emulator/forty/eight/MainActivity.java @@ -53,6 +53,7 @@ import androidx.core.content.FileProvider; import androidx.core.view.GravityCompat; import androidx.documentfile.provider.DocumentFile; import androidx.drawerlayout.widget.DrawerLayout; +import androidx.fragment.app.Fragment; import com.google.android.material.navigation.NavigationView; @@ -105,8 +106,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On private ImageButton imageButtonMenu; private Vibrator vibrator; - - public static final int INTENT_GETOPENFILENAME = 1; + public static final int INTENT_GETOPENFILENAME = 1; public static final int INTENT_GETSAVEFILENAME = 2; public static final int INTENT_OBJECT_LOAD = 3; public static final int INTENT_OBJECT_SAVE = 4; @@ -116,8 +116,8 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On public static final int INTENT_PICK_KML_FOLDER_FOR_SECURITY = 10; public static final int INTENT_PICK_KML_FOLDER_FOR_KML_NOT_FOUND = 11; public static final int INTENT_CREATE_RAM_CARD = 12; - public static final int INTENT_MACRO_LOAD = 13; - public static final int INTENT_MACRO_SAVE = 14; + public static final int INTENT_MACRO_LOAD = 13; + public static final int INTENT_MACRO_SAVE = 14; public static final int INTENT_CREATE_FLASH_ROM = 15; public static final int INTENT_LOAD_FLASH_ROM = 16; @@ -125,7 +125,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On public String urlToOpenInIntentPort2Load; public String kmlScriptFolderInIntentPort2Load; - private final String kmlMimeType = "application/vnd.google-earth.kml+xml"; private boolean kmlFolderUseDefault = true; private String kmlFolderURL = ""; @@ -1737,7 +1736,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On final int GENERIC_READ = 1; final int GENERIC_WRITE = 2; SparseArray parcelFileDescriptorPerFd = null; - public int openFileFromContentResolver(String fileURL, int writeAccess) { + public int openFileFromContentResolver(String fileURL, int writeAccess) { //https://stackoverflow.com/a/31677287 Uri uri = Uri.parse(fileURL); ParcelFileDescriptor filePfd; @@ -1997,11 +1996,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On @SuppressWarnings("UnusedDeclaration") public void performHapticFeedback() { -// if(settings.getBoolean("settings_haptic_feedback", true)) -// //mainScreenView.performHapticFeedback(HapticFeedbackConstants.CONTEXT_CLICK, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); -// mainScreenView.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); -// //mainScreenView.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); - Utils.vibrate(vibrator, settings.getInt("settings_haptic_feedback_duration", 25)); } @@ -2124,10 +2118,10 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On NativeLib.setConfiguration("settings_sound_volume", isDynamicValue, volumeOption, 0, null); break; } - case "settings_haptic_feedback": + case "settings_haptic_feedback": case "settings_haptic_feedback_duration": - // Nothing to do - break; + // Nothing to do + break; case "settings_background_kml_color": mainScreenView.setBackgroundKmlColor(settings.getBoolean("settings_background_kml_color", false)); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 30495f3..7b0486d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -89,7 +89,7 @@ Error when Loading Flash ROM Cannot load the Flash ROM. Reset to the default Flash ROM (from the current KML script). Please, try to load it again from the menu. - Permission Denied + Permission Denied For security reason, you must select the folder where are the KML and ROM files, please. Please, open again I hope now you could open again the state file. @@ -99,7 +99,7 @@ The KML script "%s" cannot be found in the folder "%s". You must select the folder where are the KML and ROM files, please. Port 2 File not Found The port 2 file "%s" cannot be found. You should select it again, please. - State saved in %s + State saved in %s State %s and flash %s saved Do you want to save changes?\n(BACK to cancel) Do you want to save this new state file?\n(To avoid losing the state of the machine) @@ -180,7 +180,7 @@ Port 1 is Writable Port 2 is Plugged Port 2 is Writable - Port 2 File + Port 2 File Port 2 Flash File Printer Simulator diff --git a/app/src/main/res/xml/pref_general.xml b/app/src/main/res/xml/pref_general.xml index 436ff75..c082869 100644 --- a/app/src/main/res/xml/pref_general.xml +++ b/app/src/main/res/xml/pref_general.xml @@ -26,7 +26,7 @@ -