mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
ZEsarUX: bump version
This commit is contained in:
@@ -1,14 +1,52 @@
|
||||
From fa1c585ba53a153e0fb5b202661be2e925d57dd8 Mon Sep 17 00:00:00 2001
|
||||
From 341ce1b8721392081848b08594ab1408915ea3cf 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
|
||||
Date: Mon, 6 Sep 2021 21:58:38 +1000
|
||||
Subject: Fixes for Haiku
|
||||
|
||||
|
||||
diff --git a/src/configure b/src/configure
|
||||
index 924d161..444b9d3 100755
|
||||
--- a/src/configure
|
||||
+++ b/src/configure
|
||||
@@ -1643,7 +1643,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 EXCLUSIVEFEATURES 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 salamanquesa.bmp
|
||||
+COMMONFILES=ACKNOWLEDGEMENTS LICENSE LICENSES_info licenses Changelog TODO* README HISTORY FEATURES EXCLUSIVEFEATURES 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 salamanquesa.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
|
||||
|
||||
diff --git a/src/cpu.c b/src/cpu.c
|
||||
index 2ab0c4b..b2a0ae6 100644
|
||||
--- a/src/cpu.c
|
||||
+++ b/src/cpu.c
|
||||
@@ -261,8 +261,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
|
||||
@@ -9047,4 +9052,4 @@ void end_emulator_saveornot_config(int saveconfig)
|
||||
void end_emulator(void)
|
||||
{
|
||||
end_emulator_saveornot_config(1);
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/src/cpu.h b/src/cpu.h
|
||||
index 92766c4..b219527 100644
|
||||
index a41f5aa..e123893 100644
|
||||
--- a/src/cpu.h
|
||||
+++ b/src/cpu.h
|
||||
@@ -182,7 +182,7 @@ extern z80_bit core_end_frame_check_zrcp_zeng_snap;
|
||||
@@ -183,7 +183,7 @@ extern z80_bit core_end_frame_check_zrcp_zeng_snap;
|
||||
|
||||
|
||||
//Para haiku
|
||||
@@ -17,42 +55,6 @@ index 92766c4..b219527 100644
|
||||
//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
|
||||
@@ -70,8 +72,50 @@ M`T3xa?|Hrc0-Q97Gynhq
|
||||
literal 0
|
||||
HcmV?d00001
|
||||
|
||||
diff --git a/src/generate_install_sh.sh b/src/generate_install_sh.sh
|
||||
index 4483009..54662b9 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 EXCLUSIVEFEATURES 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 salamanquesa.bmp"
|
||||
+COMMONFILES="ACKNOWLEDGEMENTS LICENSE LICENSES_info licenses Changelog TODO* README HISTORY FEATURES EXCLUSIVEFEATURES 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 salamanquesa.bmp cursor.bmp"
|
||||
|
||||
|
||||
cp -a \$COMMONFILES $INSTALLPREFIX/share/zesarux/
|
||||
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/menu.c b/src/menu.c
|
||||
index b98a0e0..df86709 100644
|
||||
--- a/src/menu.c
|
||||
+++ b/src/menu.c
|
||||
@@ -1438,7 +1438,11 @@ void menu_chdir_sharedfiles(void)
|
||||
zvfs_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);
|
||||
zvfs_chdir(installshare);
|
||||
|
||||
diff --git a/src/scrsdl2.c b/src/scrsdl2.c
|
||||
index de2635d..403d997 100644
|
||||
index 172bab5..c53b981 100644
|
||||
--- a/src/scrsdl2.c
|
||||
+++ b/src/scrsdl2.c
|
||||
@@ -65,10 +65,14 @@ int scrsdl_debe_redimensionar=0;
|
||||
@@ -116,12 +160,16 @@ index de2635d..403d997 100644
|
||||
|
||||
modificado_border.v=1;
|
||||
|
||||
@@ -130,7 +135,11 @@ int scrsdl_crea_ventana(void)
|
||||
@@ -130,7 +135,15 @@ int scrsdl_crea_ventana(void)
|
||||
|
||||
menu_init_footer();
|
||||
|
||||
-
|
||||
+ SDL_Surface *cursor = SDL_LoadBMP("share/zesaruz/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);
|
||||
@@ -129,7 +177,7 @@ index de2635d..403d997 100644
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -283,13 +292,39 @@ void scrsdl_refresca_border(void)
|
||||
@@ -283,13 +296,39 @@ void scrsdl_refresca_border(void)
|
||||
|
||||
void scrsdl_refresca_pantalla_solo_driver(void)
|
||||
{
|
||||
@@ -161,7 +209,7 @@ index de2635d..403d997 100644
|
||||
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 (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);
|
||||
@@ -170,7 +218,7 @@ index de2635d..403d997 100644
|
||||
SDL_RenderPresent(renderer);
|
||||
}
|
||||
|
||||
@@ -1437,23 +1472,11 @@ See the SDL documentation. Scancodes represent the physical position of the keys
|
||||
@@ -1443,23 +1482,11 @@ See the SDL documentation. Scancodes represent the physical position of the keys
|
||||
|
||||
}
|
||||
|
||||
@@ -197,7 +245,7 @@ index de2635d..403d997 100644
|
||||
|
||||
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
|
||||
@@ -1471,7 +1498,7 @@ See the SDL documentation. Scancodes represent the physical position of the keys
|
||||
|
||||
//mouse button
|
||||
if (event.type==SDL_MOUSEBUTTONDOWN) {
|
||||
@@ -206,7 +254,7 @@ index de2635d..403d997 100644
|
||||
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
|
||||
@@ -1496,6 +1523,7 @@ See the SDL documentation. Scancodes represent the physical position of the keys
|
||||
}
|
||||
|
||||
if (event.type==SDL_MOUSEBUTTONUP) {
|
||||
@@ -214,125 +262,60 @@ index de2635d..403d997 100644
|
||||
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
|
||||
diff --git a/src/utils.c b/src/utils.c
|
||||
index 2c04911..d0f5144 100644
|
||||
--- a/src/utils.c
|
||||
+++ b/src/utils.c
|
||||
@@ -1197,7 +1197,11 @@ void old_open_sharedfile(char *archivo,FILE **f)
|
||||
|
||||
-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
|
||||
//sino, en INSTALLPREFIX/share/zesarux
|
||||
if (!(*f)) {
|
||||
+#ifdef __HAIKU__
|
||||
+char *driver_screen="sdl";
|
||||
+char *driver_audio="sdl";
|
||||
+ sprintf(buffer_nombre,"%s/%s/%s",INSTALL_PREFIX,"/data/",archivo);
|
||||
+#else
|
||||
char *driver_screen="";
|
||||
char *driver_audio="";
|
||||
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");
|
||||
}
|
||||
@@ -1232,7 +1236,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);
|
||||
}
|
||||
@@ -1303,7 +1311,11 @@ void open_sharedfile_write(char *archivo,FILE **f)
|
||||
|
||||
//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
|
||||
|
||||
|
||||
//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);
|
||||
}
|
||||
diff --git a/src/utils.h b/src/utils.h
|
||||
index 93eddff..f9395c0 100644
|
||||
index b35b224..6c8d6d7 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
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
-#ifdef __FreeBSD__
|
||||
+#if defined(__FreeBSD__) || defined(__HAIKU__)
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
@@ -612,7 +612,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);
|
||||
|
||||
@@ -345,104 +328,5 @@ index 93eddff..f9395c0 100644
|
||||
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
|
||||
2.30.2
|
||||
|
||||
@@ -28,9 +28,9 @@ And also:
|
||||
HOMEPAGE="https://github.com/chernandezba/zesarux"
|
||||
COPYRIGHT="Cesar Hernandez Bano"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/chernandezba/zesarux/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="bc911f64bf6d7f3dfee771d796bf925d7ca3acb19ada6184ff13d6719b17f21b"
|
||||
CHECKSUM_SHA256="75f1e38ab9a462dfcf5bafe84fee3c2a4130416658c438fb1d6272d995e48533"
|
||||
SOURCE_DIR="zesarux-$portVersion"
|
||||
PATCHES="zesarux-$portVersion.patchset"
|
||||
|
||||
Reference in New Issue
Block a user