This commit is contained in:
twinaphex 2020-05-26 19:22:48 +02:00
parent d886fcdcef
commit f212238b31
10 changed files with 62 additions and 62 deletions

View File

@ -2351,16 +2351,16 @@ static void CDInsertEject(void)
#ifndef HAVE_CDROM_NEW
if(!(*cdifs)[disc]->Eject(CD_TrayOpen))
{
MDFN_DispMessage(_("Eject error."));
MDFN_DispMessage("Eject error.");
CD_TrayOpen = !CD_TrayOpen;
}
#endif
}
if(CD_TrayOpen)
MDFN_DispMessage(_("Virtual CD Drive Tray Open"));
MDFN_DispMessage("Virtual CD Drive Tray Open");
else
MDFN_DispMessage(_("Virtual CD Drive Tray Closed"));
MDFN_DispMessage("Virtual CD Drive Tray Closed");
SetDiscWrapper(CD_TrayOpen);
}
@ -2373,20 +2373,20 @@ static void CDEject(void)
static void CDSelect(void)
{
if(cdifs && CD_TrayOpen)
{
int disc_count = (CD_IsPBP ? PBP_PhysicalDiscCount : (int)cdifs->size());
if(cdifs && CD_TrayOpen)
{
int disc_count = (CD_IsPBP ? PBP_PhysicalDiscCount : (int)cdifs->size());
CD_SelectedDisc = (CD_SelectedDisc + 1) % (disc_count + 1);
CD_SelectedDisc = (CD_SelectedDisc + 1) % (disc_count + 1);
if(CD_SelectedDisc == disc_count)
CD_SelectedDisc = -1;
if(CD_SelectedDisc == disc_count)
CD_SelectedDisc = -1;
if(CD_SelectedDisc == -1)
MDFN_DispMessage(_("Disc absence selected."));
else
MDFN_DispMessage(_("Disc %d of %d selected."), CD_SelectedDisc + 1, disc_count);
}
if(CD_SelectedDisc == -1)
MDFN_DispMessage("Disc absence selected.");
else
MDFN_DispMessage("Disc %d of %d selected.", CD_SelectedDisc + 1, disc_count);
}
}
int StateAction(StateMem *sm, int load, int data_only)
@ -4954,7 +4954,7 @@ const char *MDFN_MakeFName(MakeFName_Type type, int id1, const char *cd1)
return fullpath;
}
void MDFND_DispMessage(unsigned char *str)
static void MDFND_DispMessage(unsigned char *str)
{
const char *strc = (const char*)str;
struct retro_message msg =

View File

@ -42,7 +42,7 @@ static T CCD_ReadInt(CCD_Section &s, const std::string &propname, const bool hav
{
if(have_defval)
return defval;
throw MDFN_Error(0, _("Missing property: %s"), propname.c_str());
throw MDFN_Error(0, "Missing property: %s", propname.c_str());
}
const std::string &v = zit->second;
@ -61,7 +61,7 @@ static T CCD_ReadInt(CCD_Section &s, const std::string &propname, const bool hav
ret = strtoul(vp, &ep, scan_base);
if(!vp[0] || ep[0])
throw MDFN_Error(0, _("Property %s: Malformed integer: %s"), propname.c_str(), v.c_str());
throw MDFN_Error(0, "Property %s: Malformed integer: %s", propname.c_str(), v.c_str());
return ret;
}
@ -139,7 +139,7 @@ bool CDAccess_CCD::Load(const char *path, bool image_memcache)
{
if(linebuf.length() < 3 || linebuf[linebuf.length() - 1] != ']')
{
MDFN_Error(0, _("Malformed section specifier: %s"), linebuf.c_str());
MDFN_Error(0, "Malformed section specifier: %s", linebuf.c_str());
return false;
}
@ -154,7 +154,7 @@ bool CDAccess_CCD::Load(const char *path, bool image_memcache)
if(feqpos == std::string::npos || feqpos != leqpos)
{
MDFN_Error(0, _("Malformed value pair specifier: %s"), linebuf.c_str());
MDFN_Error(0, "Malformed value pair specifier: %s", linebuf.c_str());
return false;
}
@ -179,13 +179,13 @@ bool CDAccess_CCD::Load(const char *path, bool image_memcache)
if(num_sessions != 1)
{
MDFN_Error(0, _("Unsupported number of sessions: %u"), num_sessions);
MDFN_Error(0, "Unsupported number of sessions: %u", num_sessions);
return false;
}
if(data_tracks_scrambled)
{
MDFN_Error(0, _("Scrambled CCD data tracks currently not supported."));
MDFN_Error(0, "Scrambled CCD data tracks currently not supported.");
return false;
}
@ -260,7 +260,7 @@ bool CDAccess_CCD::Load(const char *path, bool image_memcache)
if(ss % 2352)
{
MDFN_Error(0, _("CCD image size is not evenly divisible by 2352."));
MDFN_Error(0, "CCD image size is not evenly divisible by 2352.");
return false;
}
@ -279,7 +279,7 @@ bool CDAccess_CCD::Load(const char *path, bool image_memcache)
if(sub_stream->size() != (int64)img_numsectors * 96)
{
MDFN_Error(0, _("CCD SUB file size mismatch."));
MDFN_Error(0, "CCD SUB file size mismatch.");
return false;
}
}
@ -347,7 +347,7 @@ bool CDAccess_CCD::CheckSubQSanity(void)
!BCD_is_valid(am_bcd) || !BCD_is_valid(as_bcd) || !BCD_is_valid(af_bcd) ||
rs_bcd > 0x59 || rf_bcd > 0x74 || as_bcd > 0x59 || af_bcd > 0x74)
{
MDFN_Error(0, _("Garbage subchannel Q data detected(bad BCD/out of range): %02x:%02x:%02x %02x:%02x:%02x"), rm_bcd, rs_bcd, rf_bcd, am_bcd, as_bcd, af_bcd);
MDFN_Error(0, "Garbage subchannel Q data detected(bad BCD/out of range): %02x:%02x:%02x %02x:%02x:%02x", rm_bcd, rs_bcd, rf_bcd, am_bcd, as_bcd, af_bcd);
return false;
}
@ -358,7 +358,7 @@ bool CDAccess_CCD::CheckSubQSanity(void)
if(track < prev_track)
{
MDFN_Error(0, _("Garbage subchannel Q data detected(bad track number)"));
MDFN_Error(0, "Garbage subchannel Q data detected(bad track number)");
return false;
}
@ -398,7 +398,7 @@ bool CDAccess_CCD::Read_Raw_Sector(uint8 *buf, int32 lba)
if(lba < 0 || (size_t)lba >= img_numsectors)
{
MDFN_Error(0, _("LBA out of range."));
MDFN_Error(0, "LBA out of range.");
return false;
}
@ -419,7 +419,7 @@ bool CDAccess_CCD::Read_Raw_PW(uint8_t *buf, int32_t lba)
if(lba < 0 || (size_t)lba >= img_numsectors)
{
MDFN_Error(0, _("LBA out of range."));
MDFN_Error(0, "LBA out of range.");
return false;
}

View File

@ -521,7 +521,7 @@ int CDAccess_CHD::LoadSBI(const char* sbi_path)
}
#if 0
MDFN_printf(_("Loaded Q subchannel replacements for %zu sectors.\n"), SubQReplaceMap.size());
MDFN_printf("Loaded Q subchannel replacements for %zu sectors.\n", SubQReplaceMap.size());
#endif
log_cb(RETRO_LOG_INFO, "[CHD] Loaded SBI file %s\n", sbi_path);
return 0;

View File

@ -305,7 +305,7 @@ bool CDAccess_Image::ParseTOCFileLineInfo(CDRFILE_TRACK_INFO *track, const int t
if(tmp_long > sectors)
{
MDFN_Error(0, _("Length specified in TOC file for track %d is too large by %ld sectors!\n"), tracknum, (long)(tmp_long - sectors));
MDFN_Error(0, "Length specified in TOC file for track %d is too large by %ld sectors!\n", tracknum, (long)(tmp_long - sectors));
return false;
}
sectors = tmp_long;
@ -354,7 +354,7 @@ int CDAccess_Image::LoadSBI(const char* sbi_path)
memcpy(SubQReplaceMap[aba].data, tmpq, 12);
}
//MDFN_printf(_("Loaded Q subchannel replacements for %zu sectors.\n"), SubQReplaceMap.size());
//MDFN_printf("Loaded Q subchannel replacements for %zu sectors.\n", SubQReplaceMap.size());
log_cb(RETRO_LOG_INFO, "[Image] Loaded SBI file %s\n", sbi_path);
filestream_close(sbis);
return 0;
@ -457,7 +457,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
if(AutoTrackInc > 99)
{
MDFN_Error(0, _("Invalid track number: %d"), AutoTrackInc);
MDFN_Error(0, "Invalid track number: %d", AutoTrackInc);
return false;
}
@ -479,7 +479,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
if(format_lookup == _DI_FORMAT_COUNT)
{
MDFN_Error(0, _("Invalid track format: %s"), args[0].c_str());
MDFN_Error(0, "Invalid track format: %s", args[0].c_str());
return false;
}
@ -489,7 +489,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
if(!strcasecmp(args[1].c_str(), "RW"))
{
TmpTrack.SubchannelMode = CDRF_SUBM_RW;
MDFN_Error(0, _("\"RW\" format subchannel data not supported, only \"RW_RAW\" is!"));
MDFN_Error(0, "\"RW\" format subchannel data not supported, only \"RW_RAW\" is!");
return false;
}
else if(!strcasecmp(args[1].c_str(), "RW_RAW"))
@ -498,15 +498,15 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
} // end to TRACK
else if(cmdbuf == "SILENCE")
{
//throw MDFN_Error(0, _("Unsupported directive: %s"), cmdbuf.c_str());
//throw MDFN_Error(0, "Unsupported directive: %s", cmdbuf.c_str());
}
else if(cmdbuf == "ZERO")
{
//throw MDFN_Error(0, _("Unsupported directive: %s"), cmdbuf.c_str());
//throw MDFN_Error(0, "Unsupported directive: %s", cmdbuf.c_str());
}
else if(cmdbuf == "FIFO")
{
MDFN_Error(0, _("Unsupported directive: %s"), cmdbuf.c_str());
MDFN_Error(0, "Unsupported directive: %s", cmdbuf.c_str());
return false;
}
else if(cmdbuf == "FILE" || cmdbuf == "AUDIOFILE")
@ -552,7 +552,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
{
if(active_track < 0)
{
MDFN_Error(0, _("Command %s is outside of a TRACK definition!\n"), cmdbuf.c_str());
MDFN_Error(0, "Command %s is outside of a TRACK definition!\n", cmdbuf.c_str());
return false;
}
int m,s,f;
@ -563,7 +563,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
{
if(active_track < 0)
{
MDFN_Error(0, _("Command %s is outside of a TRACK definition!\n"), cmdbuf.c_str());
MDFN_Error(0, "Command %s is outside of a TRACK definition!\n", cmdbuf.c_str());
return false;
}
int m,s,f;
@ -592,7 +592,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
}
else
{
MDFN_Error(0, _("Unsupported argument to \"NO\" directive: %s"), args[0].c_str());
MDFN_Error(0, "Unsupported argument to \"NO\" directive: %s", args[0].c_str());
return false;
}
}
@ -613,7 +613,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
disc_type = DISC_TYPE_CD_XA;
else
{
//throw MDFN_Error(0, _("Unsupported directive: %s"), cmdbuf.c_str());
//throw MDFN_Error(0, "Unsupported directive: %s", cmdbuf.c_str());
}
// TODO: CATALOG
@ -631,7 +631,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
if(!MDFN_IsFIROPSafe(args[0]))
{
MDFN_Error(0, _("Referenced path \"%s\" is potentially unsafe. See \"filesys.untrusted_fip_check\" setting.\n"), args[0].c_str());
MDFN_Error(0, "Referenced path \"%s\" is potentially unsafe. See \"filesys.untrusted_fip_check\" setting.\n", args[0].c_str());
return false;
}
@ -665,13 +665,13 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
if(!TmpTrack.AReader)
{
MDFN_Error(0, _("Unsupported audio track file format: %s\n"), args[0].c_str());
MDFN_Error(0, "Unsupported audio track file format: %s\n", args[0].c_str());
return false;
}
}
else
{
MDFN_Error(0, _("Unsupported track format: %s\n"), args[1].c_str());
MDFN_Error(0, "Unsupported track format: %s\n", args[1].c_str());
return false;
}
}
@ -706,13 +706,13 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
if(format_lookup == _DI_FORMAT_COUNT)
{
MDFN_Error(0, _("Invalid track format: %s\n"), args[1].c_str());
MDFN_Error(0, "Invalid track format: %s\n", args[1].c_str());
return false;
}
if(active_track < 0 || active_track > 99)
{
MDFN_Error(0, _("Invalid track number: %d\n"), active_track);
MDFN_Error(0, "Invalid track number: %d\n", active_track);
return false;
}
}
@ -724,7 +724,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
if(sscanf(args[1].c_str(), "%u:%u:%u", &m, &s, &f) != 3)
{
MDFN_Error(0, _("Malformed m:s:f time in \"%s\" directive: %s"), cmdbuf.c_str(), args[0].c_str());
MDFN_Error(0, "Malformed m:s:f time in \"%s\" directive: %s", cmdbuf.c_str(), args[0].c_str());
return false;
}
@ -742,7 +742,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
if(sscanf(args[0].c_str(), "%u:%u:%u", &m, &s, &f) != 3)
{
MDFN_Error(0, _("Malformed m:s:f time in \"%s\" directive: %s"), cmdbuf.c_str(), args[0].c_str());
MDFN_Error(0, "Malformed m:s:f time in \"%s\" directive: %s", cmdbuf.c_str(), args[0].c_str());
return false;
}
@ -757,7 +757,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
if(sscanf(args[0].c_str(), "%u:%u:%u", &m, &s, &f) != 3)
{
MDFN_Error(0, _("Malformed m:s:f time in \"%s\" directive: %s"), cmdbuf.c_str(), args[0].c_str());
MDFN_Error(0, "Malformed m:s:f time in \"%s\" directive: %s", cmdbuf.c_str(), args[0].c_str());
return false;
}
@ -792,7 +792,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
}
else
{
MDFN_Error(0, _("Unknown CUE sheet \"FLAGS\" directive flag \"%s\".\n"), args[i].c_str());
MDFN_Error(0, "Unknown CUE sheet \"FLAGS\" directive flag \"%s\".\n", args[i].c_str());
return false;
}
}
@ -802,7 +802,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
log_cb(RETRO_LOG_ERROR, "Unsupported CUE sheet directive: \"%s\".\n", cmdbuf.c_str());
else
{
MDFN_Error(0, _("Unknown CUE sheet directive \"%s\".\n"), cmdbuf.c_str());
MDFN_Error(0, "Unknown CUE sheet directive \"%s\".\n", cmdbuf.c_str());
return false;
}
} // end of CUE sheet handling
@ -813,7 +813,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
if(FirstTrack > LastTrack)
{
MDFN_Error(0, _("No tracks found!\n"));
MDFN_Error(0, "No tracks found!\n");
return false;
}
@ -1079,7 +1079,7 @@ bool CDAccess_Image::Read_Raw_Sector(uint8 *buf, int32 lba)
if(!TrackFound)
{
MDFN_Error(0, _("Could not find track for sector %u!"), lba);
MDFN_Error(0, "Could not find track for sector %u!", lba);
return false;
}

View File

@ -718,7 +718,7 @@ int CDAccess_PBP::LoadSBI(const char* sbi_path)
}
#if 0
MDFN_printf(_("Loaded Q subchannel replacements for %zu sectors.\n"), SubQReplaceMap.size());
MDFN_printf("Loaded Q subchannel replacements for %zu sectors.\n", SubQReplaceMap.size());
#endif
log_cb(RETRO_LOG_INFO, "[PBP] Loaded SBI file %s\n", sbi_path);
filestream_close(sbis);

View File

@ -608,7 +608,7 @@ CDIF_ST::CDIF_ST(CDAccess *cda) : disc_cdaccess(cda)
disc_cdaccess->Read_TOC(&disc_toc);
if(disc_toc.first_track < 1 || disc_toc.last_track > 99 || disc_toc.first_track > disc_toc.last_track)
throw(MDFN_Error(0, _("TOC first(%d)/last(%d) track numbers bad."), disc_toc.first_track, disc_toc.last_track));
throw(MDFN_Error(0, "TOC first(%d)/last(%d) track numbers bad.", disc_toc.first_track, disc_toc.last_track));
}
CDIF_ST::~CDIF_ST()

View File

@ -141,7 +141,7 @@ std::string MDFN_EvalFIP(const std::string &dir_path, const std::string &rel_pat
#endif
if(!skip_safety_check && !MDFN_IsFIROPSafe(rel_path))
throw MDFN_Error(0, _("Referenced path \"%s\" is potentially unsafe. See \"filesys.untrusted_fip_check\" setting.\n"), rel_path.c_str());
throw MDFN_Error(0, "Referenced path \"%s\" is potentially unsafe. See \"filesys.untrusted_fip_check\" setting.\n", rel_path.c_str());
if(IsAbsolutePath(rel_path.c_str()))
return(rel_path);

View File

@ -917,7 +917,7 @@ void FrontIO::SetInput(unsigned int port, const char *type, void *ptr)
else if(!strcmp(type, "dualshock"))
{
char name[256];
snprintf(name, 256, _("DualShock on port %u"), port + 1);
snprintf(name, 256, "DualShock on port %u", port + 1);
Devices[port] = Device_DualShock_Create(std::string(name));
}
else if(!strcmp(type, "mouse"))

View File

@ -1568,7 +1568,7 @@ int32_t GPU_Update(const int32_t sys_timestamp)
}
//char buffer[256];
//snprintf(buffer, sizeof(buffer), _("VIDEO STANDARD MISMATCH"));
//snprintf(buffer, sizeof(buffer), "VIDEO STANDARD MISMATCH");
//DrawTextTrans(surface->pixels + ((DisplayRect->h / 2) - (13 / 2)) * surface->pitch32, surface->pitch32 << 2, DisplayRect->w, (UTF8*)buffer,
//MAKECOLOR(0x00, 0xFF, 0x00), true, MDFN_FONT_6x13_12x13, 0);
}

View File

@ -156,7 +156,7 @@ void InputDevice_DualShock::SetAMCT(bool enabled)
else
analog_mode = true;
MDFN_DispMessage(_("%s: Analog button toggle is %s, sticks are %s"), gp_name.c_str(), amct_enabled ? _("ENABLED") : _("DISABLED"), analog_mode ? _("ON") : _("OFF"));
MDFN_DispMessage("%s: Analog button toggle is %s, sticks are %s", gp_name.c_str(), amct_enabled ? "ENABLED" : "DISABLED", analog_mode ? "ON" : "OFF");
}
//
@ -196,8 +196,8 @@ void InputDevice_DualShock::CheckManualAnaModeChange(void)
{
if(analog_mode_locked)
{
//MDFN_DispMessage(_("%s: Analog mode is %s."), gp_name.c_str(), analog_mode ? _("on") : _("off"));
MDFN_DispMessage(_("%s: 2 Analog toggle is DISABLED, sticks are %s"), gp_name.c_str(), analog_mode ? _("ON") : _("OFF"));
//MDFN_DispMessage("%s: Analog mode is %s.", gp_name.c_str(), analog_mode ? "on" : "off");
MDFN_DispMessage("%s: 2 Analog toggle is DISABLED, sticks are %s", gp_name.c_str(), analog_mode ? "ON" : "OFF");
}
else
analog_mode = !analog_mode;
@ -354,8 +354,8 @@ void InputDevice_DualShock::UpdateInput(const void *data)
if(am_prev_info != analog_mode || aml_prev_info != analog_mode_locked)
{
//MDFN_DispMessage(_("%s: Analog mode is %s(%s)."), gp_name.c_str(), analog_mode ? _("on") : _("off"), analog_mode_locked ? _("locked") : _("unlocked"));
MDFN_DispMessage(_("%s: Analog toggle is %s, sticks are %s"), gp_name.c_str(), amct_enabled ? _("ENABLED") : _("DISABLED"), analog_mode ? _("ON") : _("OFF"));
//MDFN_DispMessage("%s: Analog mode is %s(%s).", gp_name.c_str(), analog_mode ? "on" : "off", analog_mode_locked ? "locked" : "unlocked");
MDFN_DispMessage("%s: Analog toggle is %s, sticks are %s", gp_name.c_str(), amct_enabled ? "ENABLED" : "DISABLED", analog_mode ? "ON" : "OFF");
}
aml_prev_info = analog_mode_locked;
am_prev_info = analog_mode;