all repos — mgba @ 45ec6e50e23532b02c492657f781c26221698464

mGBA Game Boy Advance Emulator

Qt: Use filename for Discord if database lookup fails (fixes #1368)
Vicki Pfau vi@endrift.com
Mon, 25 Mar 2019 22:01:56 -0700
commit

45ec6e50e23532b02c492657f781c26221698464

parent

029d0e169b154dd60e02a0134da25328f8719de1

1 files changed, 5 insertions(+), 7 deletions(-)

jump to
M src/platform/qt/DiscordCoordinator.cppsrc/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); }