mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 23:48:29 +00:00
Fixed formatting of SDL_storage documentation
This commit is contained in:
@@ -32,11 +32,14 @@
|
|||||||
* platforms (game consoles in particular) are more strict about what _type_
|
* platforms (game consoles in particular) are more strict about what _type_
|
||||||
* of filesystem is being accessed; for example, game content and user data
|
* of filesystem is being accessed; for example, game content and user data
|
||||||
* are usually two separate storage devices with entirely different
|
* are usually two separate storage devices with entirely different
|
||||||
* characteristics (and possibly different low-level APIs altogether!). 2.
|
* characteristics (and possibly different low-level APIs altogether!).
|
||||||
* **How to Access:** Another common mistake is applications assuming that all
|
*
|
||||||
|
* 2. **How to Access:** Another common mistake is applications assuming that all
|
||||||
* storage is universally writeable - again, many platforms treat game content
|
* storage is universally writeable - again, many platforms treat game content
|
||||||
* and user data as two separate storage devices, and only user data is
|
* and user data as two separate storage devices, and only user data is
|
||||||
* writeable while game content is read-only. 3. **When to Access:** The most
|
* writeable while game content is read-only.
|
||||||
|
*
|
||||||
|
* 3. **When to Access:** The most
|
||||||
* common portability issue with filesystem access is _timing_ - you cannot
|
* common portability issue with filesystem access is _timing_ - you cannot
|
||||||
* always assume that the storage device is always accessible all of the time,
|
* always assume that the storage device is always accessible all of the time,
|
||||||
* nor can you assume that there are no limits to how long you have access to
|
* nor can you assume that there are no limits to how long you have access to
|
||||||
@@ -87,10 +90,13 @@
|
|||||||
*
|
*
|
||||||
* 1. **What to Access:** This code accesses a global filesystem; game data
|
* 1. **What to Access:** This code accesses a global filesystem; game data
|
||||||
* and saves are all presumed to be in the current working directory (which
|
* and saves are all presumed to be in the current working directory (which
|
||||||
* may or may not be the game's installation folder!). 2. **How to Access:**
|
* may or may not be the game's installation folder!).
|
||||||
|
*
|
||||||
|
* 2. **How to Access:**
|
||||||
* This code assumes that content paths are writeable, and that save data is
|
* This code assumes that content paths are writeable, and that save data is
|
||||||
* also writeable despite being in the same location as the game data. 3.
|
* also writeable despite being in the same location as the game data.
|
||||||
* **When to Access:** This code assumes that they can be called at any time,
|
*
|
||||||
|
* 3. **When to Access:** This code assumes that they can be called at any time,
|
||||||
* since the filesystem is always accessible and has no limits on how long the
|
* since the filesystem is always accessible and has no limits on how long the
|
||||||
* filesystem is being accessed.
|
* filesystem is being accessed.
|
||||||
*
|
*
|
||||||
@@ -192,9 +198,12 @@
|
|||||||
* Note the improvements that SDL_Storage makes:
|
* Note the improvements that SDL_Storage makes:
|
||||||
*
|
*
|
||||||
* 1. **What to Access:** This code explicitly reads from a title or user
|
* 1. **What to Access:** This code explicitly reads from a title or user
|
||||||
* storage device based on the context of the function. 2. **How to Access:**
|
* storage device based on the context of the function.
|
||||||
* This code explicitly uses either a read or write function based on the
|
*
|
||||||
* context of the function. 3. **When to Access:** This code explicitly opens
|
* 2. **How to Access:** This code explicitly uses either a read or write function based on the
|
||||||
|
* context of the function.
|
||||||
|
*
|
||||||
|
* 3. **When to Access:** This code explicitly opens
|
||||||
* the device when it needs to, and closes it when it is finished working with
|
* the device when it needs to, and closes it when it is finished working with
|
||||||
* the filesystem.
|
* the filesystem.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user