Skip to content

Commit

Permalink
v1.2.4, small multi-disk fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanvb committed Dec 22, 2022
1 parent e3ea85c commit 657980c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions core/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@ static bool get_eject_state_cb(void) {
*/
static unsigned get_image_index_cb(void) {
// log_cb(RETRO_LOG_DEBUG, "Disk control: get image index (%d)\n",diskIndex);
if (diskEjected) return diskCount + 1;
return diskIndex;
}

Expand Down Expand Up @@ -401,8 +400,7 @@ static bool set_initial_image_cb(unsigned index, const char *path) {return false
static bool get_image_path_cb(unsigned index, char *path, size_t len) {
if (index >= diskCount) return false;
if(diskPaths[index].length() > 0)
path=(char*)diskPaths[index].c_str();
len=diskPaths[index].length();
strncpy(path, diskPaths[index].c_str(), len);
log_cb(RETRO_LOG_DEBUG, "Disk control: get image path (%d) %s\n",index,path);
return true;
}
Expand All @@ -415,8 +413,7 @@ static bool get_image_path_cb(unsigned index, char *path, size_t len) {
static bool get_image_label_cb(unsigned index, char *label, size_t len) {
if(index >= diskCount) return false;
if(diskNames[index].length() > 0)
label=(char*)diskNames[index].c_str();
len=diskNames[index].length();
strncpy(label, diskNames[index].c_str(), len);
//log_cb(RETRO_LOG_DEBUG, "Disk control: get image label (%d) %s\n",index,label);
return true;
}
Expand Down Expand Up @@ -465,8 +462,10 @@ void retro_init(void)
unsigned dci;
if (environ_cb(RETRO_ENVIRONMENT_GET_DISK_CONTROL_INTERFACE_VERSION, &dci)) {
environ_cb(RETRO_ENVIRONMENT_SET_DISK_CONTROL_EXT_INTERFACE, &dccb_ext);
log_cb(RETRO_LOG_DEBUG, "Using extended disk control interface\n");
} else {
environ_cb(RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE, &dccb);
log_cb(RETRO_LOG_DEBUG, "Using basic disk control interface\n");
}

/* struct retro_led_interface led_interface;
Expand Down Expand Up @@ -580,7 +579,7 @@ void retro_get_system_info(struct retro_system_info *info)
{
memset(info, 0, sizeof(*info));
info->library_name = "ep128emu";
info->library_version = "v1.2.3";
info->library_version = "v1.2.4";
info->need_fullpath = true;
info->valid_extensions = "img|dsk|tap|dtf|com|trn|128|bas|cas|cdt|tzx|wav|tvcwav|.";
}
Expand Down
2 changes: 1 addition & 1 deletion ep128emu_core_libretro.info
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ license = "GPLv2"
permissions = ""

# Version of the core:
display_version = "v1.2.2"
display_version = "v1.2.4"

# Hardware Information - Information about the hardware the core supports (when applicable)
# Name of the manufacturer who produced the emulated system:
Expand Down

0 comments on commit 657980c

Please sign in to comment.