mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
ZEsarUX: add recipe
This commit is contained in:
37
app-emulation/zesarux/additional-files/zesarux.rdef.in
Normal file
37
app-emulation/zesarux/additional-files/zesarux.rdef.in
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
resource app_flags B_MULTIPLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = 0,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "ZEsarUX",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
resource vector_icon {
|
||||
$"6E6369660A04016C050002001602B419ADBCE3613CE361B419AD457AD74A1C2A"
|
||||
$"00B2FFFF020016023A30623CD42EBCD42E3A30624BFEFF442E4900FFFF6D0200"
|
||||
$"06023C31993A4851BA48513C31994C1D85C71A3D00ACACACFF000001035252FF"
|
||||
$"0305FBFF0305D80503FCFF0003FF00000C0606FF073E5E3E5EC1135E4E5EC334"
|
||||
$"5E54C8C860485AC5DB5CC268544458C1DFC4CCC4CC3E5EC1DFC83F3E5E5E0608"
|
||||
$"FABF28332236224E22C29FB783C7303E5CBB3CC90BC19CC83F5248C443C59852"
|
||||
$"3F522D523649B740372640B65133B639282E0604FE2236224E22C2DFB783C730"
|
||||
$"3E5CBB3CC90B3EC6643E403EC443BC96BEFD0606FF0A29332933BA4D363E3ABB"
|
||||
$"3C37C19CBBA1522DC443B9E849B740372640B651BA72B64A282E30300606FF07"
|
||||
$"3E5C3E5CC19CC83F5248C443C598523F522D5236C443B9E83E3AC19CBBA13EC1"
|
||||
$"DF3E5C3EC6643E5C5C0A162348294B29442F472F403543353C24342A302A2B47"
|
||||
$"35473C42403B3E3B453543354A2F472F4E4258425F234F0A033C5A4256425D0A"
|
||||
$"043758425042563C5A0A0437584250424A32550A0432552D534244424A0A043B"
|
||||
$"3E413A473C42400A042A302B2B4735473C0C0A0001002020210A01010112401D"
|
||||
$"890000000000004022F8420000C343AD01178400040A02010202401D89000000"
|
||||
$"0000004022F8420000C343AD0A03010302401D890000000000004022F8420000"
|
||||
$"C343AD0A04010402401D890000000000004022F8420000C343AD0A060106000A"
|
||||
$"070107000A080108000A090109000A010105000A03010A000A02010B00"
|
||||
};
|
||||
448
app-emulation/zesarux/patches/zesarux-9.1.patchset
Normal file
448
app-emulation/zesarux/patches/zesarux-9.1.patchset
Normal file
@@ -0,0 +1,448 @@
|
||||
From fa1c585ba53a153e0fb5b202661be2e925d57dd8 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 28 Jan 2021 12:03:30 +1000
|
||||
Subject: Fix build for Haiku
|
||||
|
||||
|
||||
diff --git a/src/cpu.h b/src/cpu.h
|
||||
index 92766c4..b219527 100644
|
||||
--- a/src/cpu.h
|
||||
+++ b/src/cpu.h
|
||||
@@ -182,7 +182,7 @@ extern z80_bit core_end_frame_check_zrcp_zeng_snap;
|
||||
|
||||
|
||||
//Para haiku
|
||||
-#ifdef HAIKU_OS
|
||||
+#ifdef __HAIKU__
|
||||
//Para incluir PATH_MAX
|
||||
#include <limits.h>
|
||||
#endif
|
||||
diff --git a/src/m68kcpu.h b/src/m68kcpu.h
|
||||
index 4a6e9a7..70d92a9 100644
|
||||
--- a/src/m68kcpu.h
|
||||
+++ b/src/m68kcpu.h
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
|
||||
//Para haiku
|
||||
-#ifdef HAIKU_OS
|
||||
+#ifdef __HAIKU__
|
||||
typedef unsigned int uint;
|
||||
|
||||
#else
|
||||
diff --git a/src/utils.h b/src/utils.h
|
||||
index 279592c..93eddff 100644
|
||||
--- a/src/utils.h
|
||||
+++ b/src/utils.h
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
-#ifdef __FreeBSD__
|
||||
+#if defined(__FreeBSD__) || defined(__HAIKU__)
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
From fab50041925b13f1f1011191c2f77519e8d38a78 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 28 Jan 2021 12:18:48 +1000
|
||||
Subject: Enhanced SDL2 backend
|
||||
|
||||
|
||||
diff --git a/src/cursor.bmp b/src/cursor.bmp
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..9841220b84366bb7024d3a0a18b4c6afca45290b
|
||||
GIT binary patch
|
||||
literal 1306
|
||||
zcmd7Qv8~-Y3;<9E$OTgTE?p)F(h|r3zt0-niG9Xl{}#v|%%SY}W{8X<(6lVklK=np
|
||||
z?RA~@^Ye9m7yZXqK3!i<{*V6mkDKH^I4$%^(F~VlkQB|Z1B0Y!hJ86mie}gegQRGN
|
||||
zT_i|~W{^Es>WgOBVuGY-hAl8iie}iNgQRGN{g5CjnqfaKNQ!2#fYtL{rEiAagdi!J
|
||||
zVK*j7ie}i&3X-B3b_0W?XolU?ASs%`MC#c}>RhcKcJqUzXofwIASs$*4=G5BX4r!Z
|
||||
zlA;;*FoUFM1}~^*cV#Q-bB%rvJxGdX*dHNCie}iKBS?y7*dHcHie}KMN1mb?JW$V`
|
||||
z(C*4sGUqZ_J@ORIU;_2XQ#6A~)gw>Q3>H$4JVi5D+!FE>&G4_c*WIq`30|-3?aj@d
|
||||
zc;b^d>HF!O-uUeaPrSFM37&TCn7du?WA6DsvS-D;J0;xX?`lr`6t?jb-Zi`z{*isJ
|
||||
M`T3xa?|Hrc0-Q97Gynhq
|
||||
|
||||
literal 0
|
||||
HcmV?d00001
|
||||
|
||||
diff --git a/src/scrsdl2.c b/src/scrsdl2.c
|
||||
index de2635d..403d997 100644
|
||||
--- a/src/scrsdl2.c
|
||||
+++ b/src/scrsdl2.c
|
||||
@@ -65,10 +65,14 @@ int scrsdl_debe_redimensionar=0;
|
||||
unsigned char *scrsdl_pixeles;
|
||||
|
||||
SDL_Texture *scrsdl_texture;
|
||||
-
|
||||
+SDL_Texture *cursor_texture;
|
||||
|
||||
SDL_Renderer *renderer;
|
||||
|
||||
+float zoom_width = 1.0;
|
||||
+float zoom_height = 1.0;
|
||||
+Uint32 mouse_timer = 0;
|
||||
+
|
||||
//#define screen_get_window_size_width_zoom_border_en() screen_get_window_size_width_zoom_border_en()
|
||||
#define SDL_ALTO_VENTANA screen_get_window_size_height_zoom_border_en()
|
||||
|
||||
@@ -84,7 +88,7 @@ int scrsdl_crea_ventana(void)
|
||||
flags=SDL_WINDOW_RESIZABLE;
|
||||
|
||||
if (ventana_fullscreen) {
|
||||
- flags |=SDL_WINDOW_FULLSCREEN;
|
||||
+ flags |=SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,6 +116,7 @@ int scrsdl_crea_ventana(void)
|
||||
|
||||
SDL_SetWindowTitle(window,"ZEsarUX "EMULATOR_VERSION);
|
||||
|
||||
+ SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1");
|
||||
|
||||
scrsdl_texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, ancho, SDL_ALTO_VENTANA);
|
||||
//Uint32 *pixels = new Uint32[screen_get_window_size_width_zoom_border_en() * SDL_ALTO_VENTANA];
|
||||
@@ -122,7 +127,7 @@ int scrsdl_crea_ventana(void)
|
||||
|
||||
scr_reallocate_layers_menu(ancho,alto);
|
||||
|
||||
- if (mouse_pointer_shown.v==0) SDL_ShowCursor(0);
|
||||
+ SDL_ShowCursor(SDL_DISABLE);
|
||||
|
||||
modificado_border.v=1;
|
||||
|
||||
@@ -130,7 +135,11 @@ int scrsdl_crea_ventana(void)
|
||||
|
||||
menu_init_footer();
|
||||
|
||||
-
|
||||
+ SDL_Surface *cursor = SDL_LoadBMP("share/zesaruz/cursor.bmp");
|
||||
+ SDL_SetColorKey(cursor, SDL_TRUE, SDL_MapRGB(cursor->format, 0, 0, 255));
|
||||
+ cursor_texture = SDL_CreateTextureFromSurface(renderer, cursor);
|
||||
+ SDL_SetTextureBlendMode(cursor_texture, SDL_BLENDMODE_BLEND);
|
||||
+ SDL_FreeSurface(cursor);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -283,13 +292,39 @@ void scrsdl_refresca_border(void)
|
||||
|
||||
void scrsdl_refresca_pantalla_solo_driver(void)
|
||||
{
|
||||
+ int window_width, window_height;
|
||||
+ int texture_width, texture_height;
|
||||
+ SDL_Rect texture_frame;
|
||||
|
||||
int ancho=screen_get_window_size_width_zoom_border_en();
|
||||
ancho +=screen_get_ext_desktop_width_zoom();
|
||||
|
||||
SDL_UpdateTexture(scrsdl_texture, NULL, scrsdl_pixeles, ancho * 4);
|
||||
+ SDL_GetWindowSize(window, &window_width, &window_height);
|
||||
+ SDL_QueryTexture(scrsdl_texture, NULL, NULL, &texture_width, &texture_height);
|
||||
+
|
||||
+ zoom_width = (float)window_width / (float)texture_width;
|
||||
+ zoom_height = (float)window_height / (float)texture_height;
|
||||
+
|
||||
+ if (window_width >= window_height) {
|
||||
+ texture_frame.w = (float)texture_width * zoom_height;
|
||||
+ texture_frame.h = (float)texture_height * zoom_height;
|
||||
+ texture_frame.x = (window_width - texture_frame.w) / 2;
|
||||
+ texture_frame.y = 0;
|
||||
+ } else {
|
||||
+ texture_frame.w = (float)texture_width * zoom_width;
|
||||
+ texture_frame.h = (float)texture_height * zoom_width;
|
||||
+ texture_frame.x = 0;
|
||||
+ texture_frame.y = (window_height - texture_frame.h) / 2;
|
||||
+ }
|
||||
SDL_RenderClear(renderer);
|
||||
- SDL_RenderCopy(renderer, scrsdl_texture, NULL, NULL);
|
||||
+ SDL_RenderCopy(renderer, scrsdl_texture, NULL, &texture_frame);
|
||||
+ if (mouse_pointer_shown.v != 0) {
|
||||
+ if (SDL_GetTicks() - mouse_timer < 2000) {
|
||||
+ SDL_Rect mouse_rect = {mouse_x * zoom_width, mouse_y * zoom_height, 12, 19};
|
||||
+ SDL_RenderCopy(renderer, cursor_texture, NULL, &mouse_rect);
|
||||
+ }
|
||||
+ }
|
||||
SDL_RenderPresent(renderer);
|
||||
}
|
||||
|
||||
@@ -1437,23 +1472,11 @@ See the SDL documentation. Scancodes represent the physical position of the keys
|
||||
|
||||
}
|
||||
|
||||
-
|
||||
-
|
||||
- //resize
|
||||
- //if (event.type==SDL_WINDOWEVENT_SIZE_CHANGED) {
|
||||
- if (scrsdl_recibido_resize(&event)) {
|
||||
-
|
||||
- scrsdl_resize(event.window.data1, event.window.data2);
|
||||
-
|
||||
- }
|
||||
-
|
||||
-
|
||||
//mouse motion
|
||||
if (event.type==SDL_MOUSEMOTION) {
|
||||
- mouse_x=event.motion.x;
|
||||
- mouse_y=event.motion.y;
|
||||
-
|
||||
-
|
||||
+ mouse_timer = SDL_GetTicks();
|
||||
+ mouse_x=(float)event.motion.x / zoom_width;
|
||||
+ mouse_y=(float)event.motion.y / zoom_height;
|
||||
|
||||
kempston_mouse_x=mouse_x/zoom_x;
|
||||
kempston_mouse_y=255-mouse_y/zoom_y;
|
||||
@@ -1465,7 +1488,7 @@ See the SDL documentation. Scancodes represent the physical position of the keys
|
||||
|
||||
//mouse button
|
||||
if (event.type==SDL_MOUSEBUTTONDOWN) {
|
||||
-
|
||||
+ mouse_timer = SDL_GetTicks();
|
||||
debug_printf (VERBOSE_DEBUG,"Mouse Button Press. x=%d y=%d", event.button.x, event.button.y);
|
||||
|
||||
if ( event.button.button == SDL_BUTTON_LEFT ) {
|
||||
@@ -1490,6 +1513,7 @@ See the SDL documentation. Scancodes represent the physical position of the keys
|
||||
}
|
||||
|
||||
if (event.type==SDL_MOUSEBUTTONUP) {
|
||||
+ mouse_timer = SDL_GetTicks();
|
||||
debug_printf (VERBOSE_DEBUG,"Mouse Button release. x=%d y=%d", event.button.x, event.button.y);
|
||||
if ( event.button.button == SDL_BUTTON_LEFT ) {
|
||||
//mouse_left=0;
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
From 403b033b0726c2f24de53a44728dcd405a2a5419 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 28 Jan 2021 12:20:45 +1000
|
||||
Subject: Add cursor.bmp to install
|
||||
|
||||
|
||||
diff --git a/src/configure b/src/configure
|
||||
index 2e6ce64..2d6ecda 100755
|
||||
--- a/src/configure
|
||||
+++ b/src/configure
|
||||
@@ -1625,7 +1625,7 @@ clean:
|
||||
rm -f ZEsarUX-\$(EMULATOR_VERSION)-windows.zip
|
||||
rm -f ZEsarUX-\$(EMULATOR_VERSION)-extras.zip
|
||||
|
||||
-COMMONFILES=ACKNOWLEDGEMENTS LICENSE LICENSES_info licenses Changelog TODO* README HISTORY FEATURES INSTALL INSTALLWINDOWS ALTERNATEROMS INCLUDEDTAPES DONATE FAQ *.odt mantransfev3.bin *.rom zxuno.flash tbblue.mmc speech_filters my_soft zesarux.mp3 zesarux.xcf editionnamegame.tap editionnamegame.tap.config bin_sprite_to_c.sh keyboard_*.bmp
|
||||
+COMMONFILES=ACKNOWLEDGEMENTS LICENSE LICENSES_info licenses Changelog TODO* README HISTORY FEATURES INSTALL INSTALLWINDOWS ALTERNATEROMS INCLUDEDTAPES DONATE FAQ *.odt mantransfev3.bin *.rom zxuno.flash tbblue.mmc speech_filters my_soft zesarux.mp3 zesarux.xcf editionnamegame.tap editionnamegame.tap.config bin_sprite_to_c.sh keyboard_*.bmp cursor.bmp
|
||||
|
||||
ONLYSOURCEFILES=macos *.c *.m *.h *.tpl DEVELOPMENT CHECKLIST configure generate_install_sh.sh join_tzx.sh testsound.sh txt_to_basic_lines.sh automatic_tests.sh zxuno_roms_bin_a_flash.sh *.asm benchmark_*.txt current_checklist.txt patches prism_change_boot.txt
|
||||
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
From 293fb8794d8dc02b4790a41cd71c224523fe23d2 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 28 Jan 2021 12:57:37 +1000
|
||||
Subject: Add cursor.bmp to generate_install_sh script
|
||||
|
||||
|
||||
diff --git a/src/generate_install_sh.sh b/src/generate_install_sh.sh
|
||||
index b3ba1f5..a788bcd 100755
|
||||
--- a/src/generate_install_sh.sh
|
||||
+++ b/src/generate_install_sh.sh
|
||||
@@ -13,7 +13,7 @@ mkdir -p $INSTALLPREFIX
|
||||
mkdir -p $INSTALLPREFIX/bin
|
||||
mkdir -p $INSTALLPREFIX/share/zesarux/
|
||||
|
||||
-COMMONFILES="ACKNOWLEDGEMENTS LICENSE LICENSES_info licenses Changelog TODO* README HISTORY FEATURES INSTALL INSTALLWINDOWS ALTERNATEROMS INCLUDEDTAPES DONATE FAQ *.odt mantransfev3.bin *.rom zxuno.flash tbblue.mmc speech_filters my_soft zesarux.mp3 zesarux.xcf editionnamegame.tap editionnamegame.tap.config bin_sprite_to_c.sh keyboard_*.bmp"
|
||||
+COMMONFILES="ACKNOWLEDGEMENTS LICENSE LICENSES_info licenses Changelog TODO* README HISTORY FEATURES INSTALL INSTALLWINDOWS ALTERNATEROMS INCLUDEDTAPES DONATE FAQ *.odt mantransfev3.bin *.rom zxuno.flash tbblue.mmc speech_filters my_soft zesarux.mp3 zesarux.xcf editionnamegame.tap editionnamegame.tap.config bin_sprite_to_c.sh keyboard_*.bmp cursor.bmp"
|
||||
|
||||
|
||||
cp -a \$COMMONFILES $INSTALLPREFIX/share/zesarux/
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
From f4c35f8aafd4ae1d19797cb992cfff0200f7f302 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 28 Jan 2021 14:42:09 +1000
|
||||
Subject: Use sdl by default
|
||||
|
||||
|
||||
diff --git a/src/cpu.c b/src/cpu.c
|
||||
index 4d4bee0..76c2c6e 100644
|
||||
--- a/src/cpu.c
|
||||
+++ b/src/cpu.c
|
||||
@@ -260,8 +260,13 @@ driver_struct audio_driver_array[MAX_SCR_INIT];
|
||||
int num_audio_driver_array=0;
|
||||
|
||||
//Los inicializamos a cadena vacia... No poner NULL, dado que hay varios strcmp que se comparan contra esto
|
||||
+#ifdef __HAIKU__
|
||||
+char *driver_screen="sdl";
|
||||
+char *driver_audio="sdl";
|
||||
+#else
|
||||
char *driver_screen="";
|
||||
char *driver_audio="";
|
||||
+#endif
|
||||
|
||||
|
||||
//porcentaje de velocidad de la cpu
|
||||
@@ -8905,4 +8910,4 @@ void end_emulator_saveornot_config(int saveconfig)
|
||||
void end_emulator(void)
|
||||
{
|
||||
end_emulator_saveornot_config(1);
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
From 31ca950871a543179d337403dbf254efaac76b7d Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 28 Jan 2021 14:44:43 +1000
|
||||
Subject: Relative path for cursor.bmp
|
||||
|
||||
|
||||
diff --git a/src/scrsdl2.c b/src/scrsdl2.c
|
||||
index 403d997..5602950 100644
|
||||
--- a/src/scrsdl2.c
|
||||
+++ b/src/scrsdl2.c
|
||||
@@ -135,7 +135,7 @@ int scrsdl_crea_ventana(void)
|
||||
|
||||
menu_init_footer();
|
||||
|
||||
- SDL_Surface *cursor = SDL_LoadBMP("share/zesaruz/cursor.bmp");
|
||||
+ SDL_Surface *cursor = SDL_LoadBMP("./share/zesarux/cursor.bmp");
|
||||
SDL_SetColorKey(cursor, SDL_TRUE, SDL_MapRGB(cursor->format, 0, 0, 255));
|
||||
cursor_texture = SDL_CreateTextureFromSurface(renderer, cursor);
|
||||
SDL_SetTextureBlendMode(cursor_texture, SDL_BLENDMODE_BLEND);
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
From 716ba7768b355ccaf45a39154eb1ea26f3686655 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 28 Jan 2021 14:45:09 +1000
|
||||
Subject: Move settings from home dir
|
||||
|
||||
|
||||
diff --git a/src/utils.h b/src/utils.h
|
||||
index 93eddff..f9395c0 100644
|
||||
--- a/src/utils.h
|
||||
+++ b/src/utils.h
|
||||
@@ -608,7 +608,11 @@ extern void convert_numeros_letras_puerto_teclado_continue(z80_byte tecla,int pr
|
||||
|
||||
extern int util_tape_tap_get_info(z80_byte *tape,char *texto);
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#define DEFAULT_ZESARUX_CONFIG_FILE "config/settings/zesaruxrc"
|
||||
+#else
|
||||
#define DEFAULT_ZESARUX_CONFIG_FILE ".zesaruxrc"
|
||||
+#endif
|
||||
|
||||
extern char *customconfigfile;
|
||||
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
From a7126ec66221997c38e69c943823f91c799a8302 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 28 Jan 2021 17:06:58 +1000
|
||||
Subject: Move share data to appsDir/data folder
|
||||
|
||||
|
||||
diff --git a/src/menu.c b/src/menu.c
|
||||
index 1b13790..dfb9085 100644
|
||||
--- a/src/menu.c
|
||||
+++ b/src/menu.c
|
||||
@@ -1359,7 +1359,11 @@ void menu_chdir_sharedfiles(void)
|
||||
menu_filesel_chdir("../Resources");
|
||||
|
||||
char installshare[PATH_MAX];
|
||||
+#ifdef __HAIKU__
|
||||
+ sprintf (installshare,"%s/%s",INSTALL_PREFIX,"/data/");
|
||||
+#else
|
||||
sprintf (installshare,"%s/%s",INSTALL_PREFIX,"/share/zesarux/");
|
||||
+#endif
|
||||
debug_printf(VERBOSE_INFO,"Trying %s",installshare);
|
||||
menu_filesel_chdir(installshare);
|
||||
|
||||
diff --git a/src/scrsdl2.c b/src/scrsdl2.c
|
||||
index 5602950..00318a8 100644
|
||||
--- a/src/scrsdl2.c
|
||||
+++ b/src/scrsdl2.c
|
||||
@@ -135,7 +135,11 @@ int scrsdl_crea_ventana(void)
|
||||
|
||||
menu_init_footer();
|
||||
|
||||
- SDL_Surface *cursor = SDL_LoadBMP("./share/zesarux/cursor.bmp");
|
||||
+#ifdef __HAIKU__
|
||||
+ SDL_Surface *cursor = SDL_LoadBMP(INSTALL_PREFIX "/data/cursor.bmp");
|
||||
+#else
|
||||
+ SDL_Surface *cursor = SDL_LoadBMP(INSTALL_PREFIX "/share/zesarux/cursor.bmp");
|
||||
+#endif
|
||||
SDL_SetColorKey(cursor, SDL_TRUE, SDL_MapRGB(cursor->format, 0, 0, 255));
|
||||
cursor_texture = SDL_CreateTextureFromSurface(renderer, cursor);
|
||||
SDL_SetTextureBlendMode(cursor_texture, SDL_BLENDMODE_BLEND);
|
||||
@@ -319,7 +323,7 @@ void scrsdl_refresca_pantalla_solo_driver(void)
|
||||
}
|
||||
SDL_RenderClear(renderer);
|
||||
SDL_RenderCopy(renderer, scrsdl_texture, NULL, &texture_frame);
|
||||
- if (mouse_pointer_shown.v != 0) {
|
||||
+ if (mouse_pointer_shown.v != 0 && cursor_texture!=NULL) {
|
||||
if (SDL_GetTicks() - mouse_timer < 2000) {
|
||||
SDL_Rect mouse_rect = {mouse_x * zoom_width, mouse_y * zoom_height, 12, 19};
|
||||
SDL_RenderCopy(renderer, cursor_texture, NULL, &mouse_rect);
|
||||
diff --git a/src/utils.c b/src/utils.c
|
||||
index da7c619..9873ba4 100644
|
||||
--- a/src/utils.c
|
||||
+++ b/src/utils.c
|
||||
@@ -1189,7 +1189,11 @@ void old_open_sharedfile(char *archivo,FILE **f)
|
||||
|
||||
//sino, en INSTALLPREFIX/share/zesarux
|
||||
if (!(*f)) {
|
||||
+#ifdef __HAIKU__
|
||||
+ sprintf(buffer_nombre,"%s/%s/%s",INSTALL_PREFIX,"/data/",archivo);
|
||||
+#else
|
||||
sprintf(buffer_nombre,"%s/%s/%s",INSTALL_PREFIX,"/share/zesarux/",archivo);
|
||||
+#endif
|
||||
debug_printf(VERBOSE_INFO,"Looking for file %s",buffer_nombre);
|
||||
*f=fopen(buffer_nombre,"rb");
|
||||
}
|
||||
@@ -1224,7 +1228,11 @@ int find_sharedfile(char *archivo,char *ruta_final)
|
||||
|
||||
//sino, en INSTALLPREFIX/share/zesarux
|
||||
if (!existe) {
|
||||
+#ifdef __HAIKU__
|
||||
+ sprintf(buffer_nombre,"%s/%s/%s",INSTALL_PREFIX,"/data/",archivo);
|
||||
+#else
|
||||
sprintf(buffer_nombre,"%s/%s/%s",INSTALL_PREFIX,"/share/zesarux/",archivo);
|
||||
+#endif
|
||||
debug_printf(VERBOSE_INFO,"Looking for file %s",buffer_nombre);
|
||||
existe=si_existe_archivo(buffer_nombre);
|
||||
}
|
||||
@@ -1295,7 +1303,11 @@ void open_sharedfile_write(char *archivo,FILE **f)
|
||||
|
||||
//sino, en INSTALLPREFIX/share/zesarux
|
||||
if (!(*f)) {
|
||||
+#ifdef __HAIKU__
|
||||
+ sprintf(buffer_nombre,"%s/%s/%s",INSTALL_PREFIX,"/data/",archivo);
|
||||
+#else
|
||||
sprintf(buffer_nombre,"%s/%s/%s",INSTALL_PREFIX,"/share/zesarux/",archivo);
|
||||
+#endif
|
||||
debug_printf(VERBOSE_INFO,"Looking for file %s",buffer_nombre);
|
||||
open_sharedfile_write_open(buffer_nombre,f);
|
||||
}
|
||||
@@ -18994,4 +19006,4 @@ void util_write_long_value(z80_byte *destino,unsigned int valor)
|
||||
unsigned int util_read_long_value(z80_byte *origen)
|
||||
{
|
||||
return (origen[0])|(origen[1]<<8)|(origen[2]<<16)|(origen[3]<<24);
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--
|
||||
2.30.0
|
||||
|
||||
106
app-emulation/zesarux/zesarux-9.1.recipe
Normal file
106
app-emulation/zesarux/zesarux-9.1.recipe
Normal file
@@ -0,0 +1,106 @@
|
||||
SUMMARY="ZX Second-Emulator And Released for UniX"
|
||||
DESCRIPTION="It's a ZX Machines Emulator for UNIX based operating systems (and Windows), \
|
||||
including all the Sinclair computers:
|
||||
* MK14
|
||||
* ZX80
|
||||
* ZX81
|
||||
* ZX Spectrum
|
||||
* QL
|
||||
* Z88
|
||||
|
||||
And also:
|
||||
* Timex TS 2068
|
||||
* Sam Coupe
|
||||
* Pentagon
|
||||
* Chloe 140 SE, 280 SE
|
||||
* Chrome
|
||||
* Prism
|
||||
* ZX-Uno
|
||||
* ZX-Evolution BaseConf
|
||||
* ZX-Evolution TS-Conf
|
||||
* TBBlue/ZX Spectrum Next
|
||||
* Jupiter Ace
|
||||
* Amstrad CPC 464, CPC 4128
|
||||
* MSX1
|
||||
* Spectravideo 318/328
|
||||
* Colecovision
|
||||
* Sega SG1000."
|
||||
HOMEPAGE="https://github.com/chernandezba/zesarux"
|
||||
COPYRIGHT="Cesar Hernandez Bano"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/chernandezba/zesarux/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="bc911f64bf6d7f3dfee771d796bf925d7ca3acb19ada6184ff13d6719b17f21b"
|
||||
SOURCE_DIR="zesarux-$portVersion"
|
||||
PATCHES="zesarux-$portVersion.patchset"
|
||||
|
||||
ADDITIONAL_FILES="zesarux.rdef.in"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
zesarux$secondaryArchSuffix = $portVersion
|
||||
app:ZEsarUX
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
cmd:gunzip
|
||||
cmd:sox
|
||||
cmd:tar
|
||||
cmd:unrar
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libsndfile$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libSDL2_2.0$secondaryArchSuffix
|
||||
devel:libsndfile$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:awk
|
||||
cmd:bison
|
||||
cmd:find
|
||||
cmd:flex
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:which
|
||||
cmd:xargs
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd src
|
||||
LDFLAGS="-lnetwork" ./configure --prefix=$appsDir/ZEsarUX --enable-sdl2
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd src
|
||||
make install
|
||||
mv $appsDir/ZEsarUX/bin/zesarux $appsDir/ZEsarUX/ZEsarUX
|
||||
mv $appsDir/ZEsarUX/share/zesarux $appsDir/ZEsarUX/data
|
||||
rm -rf $appsDir/ZEsarUX/{bin,share}
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.zesarux"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/zesarux.rdef.in > zesarux.rdef
|
||||
|
||||
addResourcesToBinaries zesarux.rdef $appsDir/ZEsarUX/ZEsarUX
|
||||
addAppDeskbarSymlink $appsDir/ZEsarUX/ZEsarUX
|
||||
}
|
||||
Reference in New Issue
Block a user