From b6b23c6352250534f2e4831908a1aaf917c09346 Mon Sep 17 00:00:00 2001 From: Nicolas Bacca Date: Mon, 21 Jul 2003 22:28:23 +0000 Subject: Fix COMI detection - allow auto detection if only the main data file is present svn-id: r9113 --- backends/wince/findgame.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'backends/wince/findgame.cpp') diff --git a/backends/wince/findgame.cpp b/backends/wince/findgame.cpp index b7420979cb..8c38f794b5 100644 --- a/backends/wince/findgame.cpp +++ b/backends/wince/findgame.cpp @@ -273,7 +273,7 @@ static const ScummGame GameList[] = { { "Curse of Monkey Island", "Completable", - "", "COMI.LA0", "COMI.LA1", + "", "COMI.LA0", "", "comi", 0 }, @@ -909,10 +909,12 @@ void findGame(TCHAR *directory) { continue; //MessageBox(NULL, TEXT("Check OK"), TEXT("Checking file"), MB_OK); - MultiByteToWideChar(CP_ACP, 0, current_game.check_file_2, strlen(current_game.check_file_2) + 1, checkfile, sizeof(checkfile)); - wsprintf(work, TEXT("%s\\%s"), directory, checkfile); - if (GetFileAttributes(work) == 0xFFFFFFFF) - continue; + if (strlen(current_game.check_file_2)) { + MultiByteToWideChar(CP_ACP, 0, current_game.check_file_2, strlen(current_game.check_file_2) + 1, checkfile, sizeof(checkfile)); + wsprintf(work, TEXT("%s\\%s"), directory, checkfile); + if (GetFileAttributes(work) == 0xFFFFFFFF) + continue; + } //MessageBox(NULL, TEXT("Match file !"), TEXT("..."), MB_OK); gamesFound[i] = 1; -- cgit v1.2.3