qt: Add floppy support to media history manager

This commit is contained in:
cold-brewed
2022-10-01 17:39:03 -04:00
parent d8fa6ca2ca
commit 97a99f70e3
8 changed files with 63 additions and 5 deletions

View File

@@ -161,7 +161,13 @@ plat_timer_read(void)
FILE *
plat_fopen(const char *path, const char *mode)
{
#if defined(Q_OS_MACOS) or defined(Q_OS_LINUX)
QFileInfo fi(path);
QString filename = fi.isRelative() ? usr_path + fi.filePath() : fi.filePath();
return fopen(filename.toUtf8().constData(), mode);
#else
return fopen(QString::fromUtf8(path).toLocal8Bit(), mode);
#endif
}
FILE *