Search
lxdream.org :: lxdream/src/dreamcast.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/dreamcast.c
changeset 1036:af7b0c5905dd
prev1034:7044e01148f0
next1038:f220d18c0615
author nkeynes
date Wed Jun 24 06:06:40 2009 +0000 (10 years ago)
permissions -rw-r--r--
last change Support shell substitutions in config paths
Keep track of last folder in file dialogs
Fix out-of-dateness in GTK path dialog
file annotate diff log raw
1.1 --- a/src/dreamcast.c Wed Jun 24 02:41:12 2009 +0000
1.2 +++ b/src/dreamcast.c Wed Jun 24 06:06:40 2009 +0000
1.3 @@ -85,8 +85,8 @@
1.4 */
1.5 void dreamcast_configure( )
1.6 {
1.7 - const char *bios_path = lxdream_get_config_value(CONFIG_BIOS_PATH);
1.8 - const char *flash_path = lxdream_get_config_value(CONFIG_FLASH_PATH);
1.9 + char *bios_path = lxdream_get_global_config_path_value(CONFIG_BIOS_PATH);
1.10 + char *flash_path = lxdream_get_global_config_path_value(CONFIG_FLASH_PATH);
1.11
1.12 dreamcast_register_module( &eventq_module );
1.13 /* Register the memory framework */
1.14 @@ -118,23 +118,29 @@
1.15 dreamcast_register_module( &aica_module );
1.16 dreamcast_register_module( &maple_module );
1.17 dreamcast_register_module( &ide_module );
1.18 +
1.19 + g_free(bios_path);
1.20 + g_free(flash_path);
1.21 }
1.22
1.23 void dreamcast_config_changed(void)
1.24 {
1.25 - const char *bios_path = lxdream_get_config_value(CONFIG_BIOS_PATH);
1.26 - const char *flash_path = lxdream_get_config_value(CONFIG_FLASH_PATH);
1.27 + char *bios_path = lxdream_get_global_config_path_value(CONFIG_BIOS_PATH);
1.28 + char *flash_path = lxdream_get_global_config_path_value(CONFIG_FLASH_PATH);
1.29 dreamcast_has_bios = mem_load_rom( dc_boot_rom, bios_path, 2 MB, 0x89f2b1a1 );
1.30 if( flash_path != NULL && flash_path[0] != '\0' ) {
1.31 mem_load_block( flash_path, 0x00200000, 0x00020000 );
1.32 }
1.33 + g_free(bios_path);
1.34 + g_free(flash_path);
1.35 }
1.36
1.37 void dreamcast_save_flash()
1.38 {
1.39 if( dreamcast_has_flash ) {
1.40 - const char *file = lxdream_get_config_value(CONFIG_FLASH_PATH);
1.41 + char *file = lxdream_get_global_config_path_value(CONFIG_FLASH_PATH);
1.42 mem_save_block( file, 0x00200000, 0x00020000 );
1.43 + g_free(file);
1.44 }
1.45 }
1.46
.