break; case LWJGLUtil.PLATFORM_WINDOWS: String savedGamesPath = Shell32Util.getKnownFolderPath(KnownFolders.FOLDERID_SavedGames); if (savedGamesPath == null) { savedGamesPath = Shell32Util.getKnownFolderPath(KnownFolders.FOLDERID_Documents);
public String resolveFolder(FolderId folderId) { try { logger.debug("Invoking SHGetKnownFolderPath"); return Shell32Util.getKnownFolderPath(convertFolderIdToGuid(folderId)); } catch (Win32Exception e) { logger.error("SHGetKnownFolderPath returns an error: {}", e.getErrorCode()); throw new AppDirsException( "SHGetKnownFolderPath returns an error: " + e.getErrorCode()); } catch (UnsatisfiedLinkError e) { // Fallback for pre-vista OSes. #5 try { logger.debug("SHGetKnownFolderPath failed. Trying SHGetFolderPath."); int folder = convertFolderIdToCsidl(folderId); return Shell32Util.getFolderPath(folder); } catch (Win32Exception e2) { logger.error("SHGetFolderPath returns an error: {}", e2); throw new AppDirsException( "SHGetFolderPath returns an error: " + e2.getErrorCode()); } } }