From 82fc84ccd2cded371699243b7ca37090431abcdd Mon Sep 17 00:00:00 2001 From: michaelangel007 Date: Sat, 10 Jan 2015 16:56:47 -0800 Subject: [PATCH] Change SetCurrentImageDir() to return true/false --- source/Applewin.cpp | 7 +++++-- source/Applewin.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/Applewin.cpp b/source/Applewin.cpp index debd4d47..76a0b3e6 100644 --- a/source/Applewin.cpp +++ b/source/Applewin.cpp @@ -545,7 +545,7 @@ void LoadConfiguration(void) //=========================================================================== -void SetCurrentImageDir(const char* pszImageDir) +bool SetCurrentImageDir(const char* pszImageDir) { strcpy(g_sCurrentDir, pszImageDir); @@ -556,7 +556,10 @@ void SetCurrentImageDir(const char* pszImageDir) g_sCurrentDir[ nLen + 1 ] = 0; } - SetCurrentDirectory(g_sCurrentDir); + if( SetCurrentDirectory(g_sCurrentDir) ) + return true; + + return false; } //=========================================================================== diff --git a/source/Applewin.h b/source/Applewin.h index 172bd308..24f19fd2 100644 --- a/source/Applewin.h +++ b/source/Applewin.h @@ -4,7 +4,7 @@ #include "Common.h" void SetCurrentCLK6502(); -void SetCurrentImageDir(const char* pszImageDir); +bool SetCurrentImageDir(const char* pszImageDir); extern char VERSIONSTRING[]; // Constructed in WinMain()