mirror of
https://github.com/dgis/emu48android
synced 2024-12-26 09:58:49 +01:00
Fix a win32 bug about getPixel().
This commit is contained in:
parent
fd48f40889
commit
81fd5a04b9
4 changed files with 9 additions and 18 deletions
|
@ -45,6 +45,7 @@ NOTES
|
|||
* pick the calculator (which should be "Eric's Real 50g (Large Cropped)")!
|
||||
And because, the file "FOLDER/rom.49g" is not readonly anymore, you can save your port 2.
|
||||
BUT for the moment, it is saved ONLY when you CLOSE (or change) the state file. Not when you end the application.
|
||||
- To speed up printing, set the 'delay' to 0 in the calculator's print options.
|
||||
|
||||
|
||||
NOT WORKING YET
|
||||
|
@ -59,7 +60,7 @@ CHANGES
|
|||
|
||||
Version 1.5 (2019-06-xx)
|
||||
|
||||
- Add the printer simulator.
|
||||
- Add the printer simulator (set delay to 0 to speed up!).
|
||||
- Refactor the code for easier code sharing between Emu48, Emu42 and Emu71.
|
||||
- Fix: Bad text characters when copy/paste the stack.
|
||||
- Fix: Selecting an empty KML folder prevent to select the default embedded KML folder (Github Fix: #5)!
|
||||
|
|
|
@ -2076,16 +2076,11 @@ COLORREF GetPixel(HDC hdc, int x ,int y) {
|
|||
int sourceBitCount = hBitmapSource->bitmapInfoHeader->biBitCount;
|
||||
int sourceStride = 4 * ((sourceWidth * hBitmapSource->bitmapInfoHeader->biBitCount + 31) / 32);
|
||||
|
||||
jint ret;
|
||||
|
||||
x -= hdc->windowOriginX;
|
||||
y -= hdc->windowOriginY;
|
||||
|
||||
if(!reverseHeight) {
|
||||
// int YY = sourceHeight - y;
|
||||
// y = YY;
|
||||
y = sourceHeight - y;
|
||||
}
|
||||
if(!reverseHeight)
|
||||
y = sourceHeight - 1 - y;
|
||||
|
||||
HPALETTE palette = hdc->realizedPalette;
|
||||
if(!palette)
|
||||
|
@ -2095,11 +2090,6 @@ COLORREF GetPixel(HDC hdc, int x ,int y) {
|
|||
if(!palPalEntry && sourceBitCount <= 8 && hBitmapSource->bitmapInfoHeader->biClrUsed > 0) {
|
||||
palPalEntry = (PALETTEENTRY *)hBitmapSource->bitmapInfo->bmiColors;
|
||||
}
|
||||
COLORREF brushColor = 0xFF000000; // 0xAABBGGRR
|
||||
if(hdc->selectedBrushColor) {
|
||||
brushColor = hdc->selectedBrushColor->brushColor;
|
||||
}
|
||||
|
||||
COLORREF resultColor = CLR_INVALID; // 0xAABBGGRR
|
||||
|
||||
if(x >= 0 && y >= 0 && x < sourceWidth && y < sourceHeight) {
|
||||
|
|
|
@ -228,9 +228,9 @@ public class MainScreenView extends PanAndScaleView {
|
|||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if((event.getFlags() & KeyEvent.FLAG_VIRTUAL_HARD_KEY) == 0) {
|
||||
Integer windowsKeycode = vkmap.get(keyCode);
|
||||
if (windowsKeycode != null) {
|
||||
if (windowsKeycode != null)
|
||||
NativeLib.keyDown(windowsKeycode);
|
||||
} else
|
||||
else
|
||||
Log.e(TAG, String.format("Unknown keyCode: %d", keyCode));
|
||||
}
|
||||
if(keyCode == KeyEvent.KEYCODE_BACK)
|
||||
|
|
|
@ -67,10 +67,10 @@
|
|||
<string name="message_no">No</string>
|
||||
<string name="message_object_load">Warning: Trying to load an object while the emulator is busy will certainly result in a memory lost. Before loading an object you should be sure that the calculator is in idle state. Do you want to see this warning next time you try to load an object?</string>
|
||||
<string name="message_object_save_program">Select Program</string>
|
||||
<string name="message_screenshot">Emu48 screenshot</string>
|
||||
<string name="message_share_screenshot">Share Emu48 screenshot</string>
|
||||
<string name="message_screenshot">Screenshot</string>
|
||||
<string name="message_share_screenshot">Share the screenshot</string>
|
||||
<string name="message_press_reset">Are you sure you want to press the Reset Button?</string>
|
||||
<string name="message_change_kml">You cannot change the KML script when Emu48 is not running. Use the File, New menu item to create a new calculator.</string>
|
||||
<string name="message_change_kml">You cannot change the KML script when Emulator is not running. Use the File, New menu item to create a new calculator.</string>
|
||||
<string name="message_kml_script_compilation_result">KML Script Compilation Result</string>
|
||||
<string name="message_kml_folder_selection_need_api_lollipop">Need Android 5.0</string>
|
||||
<string name="message_kml_folder_selection_need_api_lollipop_description">To select the KML folder, you need at least Android version 5.0</string>
|
||||
|
|
Loading…
Reference in a new issue