Commit Graph

23 Commits

Author SHA1 Message Date
past-due a0dfe220ff physfs_platform_windows.c: Use newer APIs when permitted by _WIN32_WINNT 2021-10-16 10:30:47 -04:00
Ryan C. Gordon f94ce0613d Fixed compiler warning. 2019-03-18 14:28:46 -04:00
Ryan C. Gordon 6b0839051f windows: Workaround for WinXP systems.
(transplanted from c8f3bbd689d6b71b84c11db74275ea3d56fef961)
2019-03-18 13:36:16 -04:00
Ryan C. Gordon 7d194a8a62 windows: Workaround GetUserProfileDirectory's API change in Win10 build 1809.
(transplanted from ece6769c0676c2d4e8a5893a1acebd0f65456817)
2018-10-03 22:40:57 -04:00
Ryan C. Gordon 62d24e228f Fixed mounting a symlink to a real directory. 2017-10-26 14:21:36 -04:00
Ryan C. Gordon 4e0d3d55e9 Make PHYSFS_EnumerateCallback return an enum instead of an int. 2017-08-19 10:40:27 -04:00
Ryan C. Gordon 5fb9119ebc windows: Disable _CRT_SECURE_NO_WARNINGS again. 2017-08-16 21:19:16 -04:00
Ryan C. Gordon 7607eeeb00 Cleaned up some header inclusion politics. 2017-08-16 20:03:24 -04:00
Ryan C. Gordon 8dfd3cff8d Fixed some compiler warnings on Visual Studio.
(and maybe made a few new ones...)
2017-08-14 21:15:58 -04:00
Ryan C. Gordon cc3ac9539e Patched to compile on various platforms and compilers. 2017-08-12 03:10:19 -04:00
Ryan C. Gordon ee9687bca9 Reworked enumeration to be more powerful.
Now callbacks can stop further enumeration and report errors, if they had a
catastrophic issue or just found what they needed and don't need to process
any more items.

Also, the actual enumerators can report errors instead of silently dropping
items. This led to several other fixes as all these implementations got
audited and reworked.

The original, non-callback enumerator now returns NULL if it can't produce a
complete list instead of dropping items and returning a partial list.
2017-08-12 02:19:22 -04:00
Ryan C. Gordon 0287160f3c Removed some FIXMEs that aren't valid. 2017-08-06 13:56:45 -04:00
Ryan C. Gordon 114bfd1b21 windows: PHYSFS_FILETYPE_OTHER files now report real filesize in PHYSFS_stat().
I don't know if it's _meaningful_, but if the OS reports it, so do we.
2017-08-06 09:25:05 -04:00
Ryan C. Gordon 61bdee4d78 __PHYSFS_platformDeinit() should return void.
What are you going to do if this fails, anyhow?
2017-08-06 01:30:58 -04:00
Ryan C. Gordon 248167af40 windows: Removed (what I think is) a copy/paste error. 2017-08-05 01:26:07 -04:00
Ryan C. Gordon be9bf023d0 windows: Use a real synchronization primitive for CD detection thread init.
Before we were waiting on a volatile int in a tight loop with a Sleep(50).
2017-08-05 01:24:53 -04:00
Ryan C. Gordon befc894b1f More FIXME cleanups. 2017-08-04 22:35:49 -04:00
Ryan C. Gordon 1e850d32ea windows: Patched to compile. 2017-08-02 13:06:56 -04:00
Ryan C. Gordon 007c2fc037 windows: Just pass HANDLEs around instead of wrapping in a struct.
We don't need the "readonly" field of this struct, because it was only used
to protect flushes on non-writable handles, but PHYSFS_flush() also keeps
track of what's read-only and won't call into the platform layer anyhow.

HANDLEs are typedef'd to be "void *" on Windows, so this is safe (so long as
we check for INVALID_HANDLE_VALUE, which is ((void*)-1), when creating new
handles.
2017-08-02 13:02:43 -04:00
Ryan C. Gordon bea510def0 windows: Fixed logic bug. 2017-08-02 12:48:40 -04:00
Ryan C. Gordon 1e2650b6fc Serious cleanup and update of Windows RT support.
This compiles for WinRT, but isn't otherwise tested at all yet.
2017-07-24 03:29:33 -04:00
Ryan C. Gordon db349bd067 Update filename comments. 2017-07-22 13:19:57 -04:00
Ryan C. Gordon 18c89c1cbc Renamed all the sources to start with "physfs_"
So now you can drop this into your program and not worry about filename
conflicts, or where "platform_unix.c" came from in the debugger, etc.

Also renamed the "beos" sources to "haiku" and "macosx" to "macos" to match
modern platform names.
2017-07-22 12:59:06 -04:00