Split-up require_results foreign blocks

This commit is contained in:
gingerBill
2025-02-05 10:41:45 +00:00
parent 83542a3f04
commit 898bea8a97
6 changed files with 39 additions and 25 deletions
+11 -5
View File
@@ -48,7 +48,7 @@ StorageInterface :: struct {
Storage :: struct {}
@(default_calling_convention="c", link_prefix="SDL_")
@(default_calling_convention="c", link_prefix="SDL_", require_results)
foreign lib {
OpenTitleStorage :: proc(override: cstring, props: PropertiesID) -> ^Storage ---
OpenUserStorage :: proc(org, app: cstring, props: PropertiesID) -> ^Storage ---
@@ -57,14 +57,20 @@ foreign lib {
CloseStorage :: proc(storage: ^Storage) -> bool ---
StorageReady :: proc(storage: ^Storage) -> bool ---
GetStorageFileSize :: proc(storage: ^Storage, path: cstring, length: ^Uint64) -> bool ---
CreateStorageDirectory :: proc(storage: ^Storage, path: cstring) -> bool ---
GetStorageSpaceRemaining :: proc(storage: ^Storage) -> Uint64 ---
GlobStorageDirectory :: proc(storage: ^Storage, path: cstring, pattern: cstring, flags: GlobFlags, count: ^c.int) -> [^][^]c.char ---
}
@(default_calling_convention="c", link_prefix="SDL_")
foreign lib {
ReadStorageFile :: proc(storage: ^Storage, path: cstring, destination: rawptr, length: Uint64) -> bool ---
WriteStorageFile :: proc(storage: ^Storage, path: cstring, source: rawptr, length: Uint64) -> bool ---
CreateStorageDirectory :: proc(storage: ^Storage, path: cstring) -> bool ---
EnumerateStorageDirectory :: proc(storage: ^Storage, path: cstring, callback: EnumerateDirectoryCallback, userdata: rawptr) -> bool ---
RemoveStoragePath :: proc(storage: ^Storage, path: cstring) -> bool ---
RenameStoragePath :: proc(storage: ^Storage, oldpath, newpath: cstring) -> bool ---
CopyStorageFile :: proc(storage: ^Storage, oldpath, newpath: cstring) -> bool ---
GetStoragePathInfo :: proc(storage: ^Storage, path: cstring, info: ^PathInfo) -> bool ---
GetStorageSpaceRemaining :: proc(storage: ^Storage) -> Uint64 ---
GlobStorageDirectory :: proc(storage: ^Storage, path: cstring, pattern: cstring, flags: GlobFlags, count: ^c.int) -> [^][^]c.char ---
}
}