Mercurial > minori
diff src/sys/osx/filesystem.cc @ 195:975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
also the general application stuff and anime list is separated in settings
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Thu, 07 Dec 2023 11:14:01 -0500 |
parents | 8548dc425697 |
children | f0ff06a45c42 |
line wrap: on
line diff
--- a/src/sys/osx/filesystem.cc Thu Dec 07 03:17:05 2023 -0500 +++ b/src/sys/osx/filesystem.cc Thu Dec 07 11:14:01 2023 -0500 @@ -1,14 +1,18 @@ #include "sys/osx/filesystem.h" #include <CoreFoundation/CoreFoundation.h> +#include <objc/runtime.h> #include <string> +/* These constants are defined in Foundation but not + * exposed to CoreFoundation users. +*/ static constexpr unsigned long NSApplicationSupportDirectory = 14; static constexpr unsigned long NSUserDomainMask = 1; extern "C" { - CFArrayRef NSSearchPathForDirectoriesInDomains(unsigned long directory, unsigned long domainMask, int expandTilde); + CFArrayRef NSSearchPathForDirectoriesInDomains(unsigned long directory, unsigned long domainMask, BOOL expandTilde); } namespace osx { @@ -35,7 +39,7 @@ CFRelease(strings); return false; } - result.resize(result.find('\0')); + result.resize(result.find_first_of('\0')); return true; }