Qt: Use filename for Discord if database lookup fails (fixes #1368)
Vicki Pfau vi@endrift.com
Mon, 25 Mar 2019 22:01:56 -0700
1 files changed,
5 insertions(+),
7 deletions(-)
M
src/platform/qt/DiscordCoordinator.cpp
→
src/platform/qt/DiscordCoordinator.cpp
@@ -63,17 +63,15 @@ }
s_gameRunning = true; CoreController::Interrupter interrupter(controller); + mCore *core = controller->thread()->core; + s_title = core->dirs.baseName; + +#ifdef USE_SQLITE3 const NoIntroDB* db = GBAApp::app()->gameDB(); NoIntroGame game{}; uint32_t crc32 = 0; - controller->thread()->core->checksum(controller->thread()->core, &crc32, CHECKSUM_CRC32); - - char gameTitle[17] = { '\0' }; - mCore* core = controller->thread()->core; - core->getGameTitle(core, gameTitle); - s_title = gameTitle; + core->checksum(core, &crc32, CHECKSUM_CRC32); -#ifdef USE_SQLITE3 if (db && crc32 && NoIntroDBLookupGameByCRC(db, crc32, &game)) { s_title = QLatin1String(game.name); }