REFACTOR : migrate common preferences settings into misc.c

- prefs.c code should be unused on Android/iOS
This commit is contained in:
Aaron Culliney 2015-02-17 16:16:34 -08:00
parent 815b6f5a7c
commit ada636f245
2 changed files with 4 additions and 13 deletions

View File

@ -25,6 +25,10 @@ extern uint8_t apple_iie_rom[32768];
bool do_logging = true; // also controlled by NDEBUG
FILE *error_log = NULL;
int sound_volume = 2;
bool is_headless = false;
color_mode_t color_mode = COLOR;
__attribute__((constructor))
static void _init_common() {
error_log = stderr;
@ -35,7 +39,6 @@ GLUE_BANK_MAYBEWRITE(write_ram_bank,base_d000_wrt)
GLUE_BANK_READ(read_ram_lc,base_e000_rd)
GLUE_BANK_MAYBEWRITE(write_ram_lc,base_e000_wrt)
GLUE_BANK_READ(iie_read_ram_default,base_ramrd)
GLUE_BANK_WRITE(iie_write_ram_default,base_ramwrt)
GLUE_BANK_READ(iie_read_ram_text_page0,base_textrd)
@ -51,7 +54,6 @@ GLUE_BANK_MAYBEREAD(iie_read_slot4,base_c4rom)
GLUE_BANK_MAYBEREAD(iie_read_slot5,base_c5rom)
GLUE_BANK_READ(iie_read_slotx,base_cxrom)
uint32_t softswitches;
const uint8_t *base_vmem = apple_ii_64k[0];
@ -73,7 +75,6 @@ uint8_t *base_c4rom;
uint8_t *base_c5rom;
uint8_t *base_cxrom;
/* -------------------------------------------------------------------------
c_debug_illegal_bcd - illegal BCD (decimal mode) computation
------------------------------------------------------------------------- */
@ -83,7 +84,6 @@ GLUE_C_READ(debug_illegal_bcd)
return 0;
}
/* -------------------------------------------------------------------------
c_set_altchar() - set alternate character set
------------------------------------------------------------------------- */

View File

@ -37,9 +37,6 @@ char disk_path[DISKSIZE];
#warning FIXME TODO : completely excise deprecated apple_mode stuff
int apple_mode = 2/*IIE_MODE*/;
int sound_volume = 2;
bool is_headless = false;
color_mode_t color_mode = COLOR;
a2_video_mode_t a2_video_mode = VIDEO_1X;
joystick_mode_t joy_mode = JOY_PCJOY;
@ -181,12 +178,6 @@ static char * clean_string(char *x)
/* Load the configuration. Must be called *once* at start. */
void load_settings(void)
{
/* running a headless emulator? */
char *headless = getenv("HEADLESS");
if (headless && (strncasecmp(headless, "1", 2) == 0) ) {
is_headless = true;
}
/* set system defaults before user defaults. */
strcpy(disk_path, "./disks");
strcpy(system_path, "./rom");