--- np2/macosx/sysmng.cpp 2003/10/28 16:44:44 1.5 +++ np2/macosx/sysmng.cpp 2003/11/24 20:44:14 1.9 @@ -7,8 +7,6 @@ #include "fddfile.h" #include "diskdrv.h" -static bool getLongFileName(char* dst, const char* path); - UINT sys_updates; @@ -97,45 +95,18 @@ void sysmng_updatecaption(BYTE flag) { milstr_ncat(strclock, work, sizeof(strclock)); } } +#if defined(NP2GCC) + milstr_ncpy(work, np2oscfg.titles, sizeof(work)); +#else milstr_ncpy(work, "Neko Project II", sizeof(work)); +#endif milstr_ncat(work, strtitle, sizeof(work)); milstr_ncat(work, strclock, sizeof(work)); #if defined(NP2GCC) - SetWindowTitleWithCFString(hWndMain, CFStringCreateWithCString(NULL, work, kCFStringEncodingUTF8)); + SetWindowTitleWithCFString(hWndMain, CFStringCreateWithCString(NULL, work, CFStringGetSystemEncoding())); #else mkstr255(str, work); SetWTitle(hWndMain, str); #endif } - -static bool getLongFileName(char* dst, const char* path) { - FSSpec fss; - Str255 fname; - FSRef fref; - char buffer[1024]; - char *ret, *val; - - if (*path == '\0') { - return(false); - } - mkstr255(fname, path); - if (FSMakeFSSpec(0, 0, fname, &fss) != noErr) { - return(false); - } - if (FSpMakeFSRef(&fss, &fref) != noErr) { - return(false); - } - if (FSRefMakePath(&fref, (UInt8*)buffer, 1024) != noErr) { - return(false); - } - val = buffer; - ret = val; - while(*val != '\0') { - if (*val++ == '/') { - ret = val; - } - } - strcpy(dst, ret); - return(true); -} \ No newline at end of file