diff --git a/src/PCEngine.cpp b/src/PCEngine.cpp index 9bc9602..181b33f 100644 --- a/src/PCEngine.cpp +++ b/src/PCEngine.cpp @@ -86,7 +86,7 @@ PCEngine::InitPaths() if (getenv("HOME")) { #ifdef __HAIKU__ - snprintf(config_basepath, PATH_MAX, "%s/config/huexpress", getenv("HOME")); + snprintf(config_basepath, PATH_MAX, "%s/config/settings/huexpress", getenv("HOME")); #else snprintf(config_basepath, PATH_MAX, "%s/.huexpress", getenv("HOME")); #endif diff --git a/src/engine/pce.c b/src/engine/pce.c index 94790a5..3e6ee04 100644 --- a/src/engine/pce.c +++ b/src/engine/pce.c @@ -1897,13 +1897,9 @@ InitPCE(char *name) } } - char home_directory[256]; - - strcpy(home_directory, getenv("HOME")); - switch (CD_emulation) { case 0: - sprintf(sav_path, "%s/.huexpress/%ssav", home_directory, + sprintf(sav_path, "%s/%ssav", config_basepath, short_cart_name); break; case 1: diff --git a/src/engine/pce.h b/src/engine/pce.h index 16981a4..448873c 100644 --- a/src/engine/pce.h +++ b/src/engine/pce.h @@ -169,10 +169,10 @@ extern uchar binbcd[0x100]; extern uint32 pce_cd_sectoraddy; struct host_sound { - boolean stereo; + bool stereo; uint32 freq; uint16 sample_size; - boolean signed_sound; + bool signed_sound; }; struct host_machine { @@ -182,12 +182,12 @@ struct host_machine { extern struct host_machine host; struct hugo_options { - boolean want_fullscreen; - boolean want_fullscreen_aspect; - boolean configure_joypads; - boolean want_arcade_card_emulation; - boolean want_supergraphx_emulation; - boolean want_television_size_emulation; + bool want_fullscreen; + bool want_fullscreen_aspect; + bool configure_joypads; + bool want_arcade_card_emulation; + bool want_supergraphx_emulation; + bool want_television_size_emulation; uint16 window_size; uint32 want_snd_freq; uint32 wanted_hardware_format; diff --git a/src/engine/shared_memory.h b/src/engine/shared_memory.h index 62bda8c..8c4c060 100644 --- a/src/engine/shared_memory.h +++ b/src/engine/shared_memory.h @@ -84,7 +84,7 @@ typedef struct tagIO { uchar psg_da_data[6][PSG_DIRECT_ACCESS_BUFSIZE]; uint16 psg_da_index[6], psg_da_count[6]; - boolean psg_channel_disabled[6]; + bool psg_channel_disabled[6]; /* TIMER */ uchar timer_reload, timer_start, timer_counter; diff --git a/src/includes/cleantypes.h b/src/includes/cleantypes.h index dfc8a4e..9f04db1 100644 --- a/src/includes/cleantypes.h +++ b/src/includes/cleantypes.h @@ -21,19 +21,13 @@ #define __CLEANTYPES_H -#ifdef TRUE -#undef TRUE +#ifndef FALSE +# define FALSE 0 #endif - -#ifdef FALSE -#undef FALSE +#ifndef TRUE +# define TRUE 1 #endif -typedef enum -{ - FALSE, - TRUE -} boolean; /* * Set datatype sizes diff --git a/src/includes/osd_sdl_snd.h b/src/includes/osd_sdl_snd.h index ac8399c..38eece4 100644 --- a/src/includes/osd_sdl_snd.h +++ b/src/includes/osd_sdl_snd.h @@ -12,7 +12,7 @@ extern Uint8 *stream; extern Mix_Chunk *chunk; extern SDL_AudioCVT cvt; -extern boolean Callback_Stop; -extern boolean USE_S16; +extern bool Callback_Stop; +extern bool USE_S16; #endif diff --git a/src/osd_keyboard.c b/src/osd_keyboard.c index eb2edf2..8b7b3b7 100644 --- a/src/osd_keyboard.c +++ b/src/osd_keyboard.c @@ -226,7 +226,7 @@ sdl_config_joypad_axis(short which, joymap axis, uint16 * bad_axes, uint16 num_axes) { uchar t; - boolean done = FALSE; + bool done = FALSE; while (1) { if (read (fileno (stdin), &t, 1) == -1) @@ -289,7 +289,7 @@ sdl_config_joypad_button (short which, joymap button, uint16 * bad_buttons, uint16 num_buttons) { uchar t; - boolean done = FALSE; + bool done = FALSE; while (1) { if (read (fileno (stdin), &t, 1) == -1) diff --git a/src/osd_sdl_snd.c b/src/osd_sdl_snd.c index 361c81b..46ea502 100644 --- a/src/osd_sdl_snd.c +++ b/src/osd_sdl_snd.c @@ -9,8 +9,8 @@ Uint8 *stream; Mix_Chunk *chunk; SDL_AudioCVT cvt; -boolean Callback_Stop; -boolean USE_S16; +bool Callback_Stop; +bool USE_S16; void