Skip to content

Commit

Permalink
Attempt to mitigate "whole fucking string as gamename" problem
Browse files Browse the repository at this point in the history
Doesn't do anything about Windows not deduplicating in-progress messages when connecting mid-session, but at least NOT connecting is better for now.
  • Loading branch information
SeongGino authored Mar 26, 2024
1 parent 783845d commit 4708b92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qhookermain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void qhookerMain::SerialInit()
for(int i = serialFoundList.length() - 1; i >= 0; --i) {
// Detect GUN4ALL and GUN4IR guns (are we the only ones that support this?)
if(serialFoundList[i].vendorIdentifier() == 2336 ||
serialFoundList[i].vendorIdentifier() == 9025 ||
serialFoundList[i].vendorIdentifier() == 9025 ||
serialFoundList[i].vendorIdentifier() == 13939) {
qInfo() << "Found device @" << serialFoundList[i].systemLocation();
} else {
Expand Down Expand Up @@ -134,7 +134,7 @@ void qhookerMain::GameSearching(QString input)
buffer[0] = buffer[0].trimmed();

// flycast outputs its start signal with code "game" using a game's full title instead of a mame zip name
if(buffer[0].contains("mame_start =") || input.contains("game =")) {
if(buffer[0].startsWith("mame_start =") || input.startsWith("game =")) {
qInfo() << "Detected game name!";
input.remove(" ");
input = input.trimmed();
Expand Down

0 comments on commit 4708b92

Please sign in to comment.