Files
src/miniquake2/platform/dedicated_console.ml
Provides miniquake2 platform dedicated console facilities for this project.
- Package
miniquake2.platform.dedicated_console- Reachable
- Yes
Imports
Declarations
# acceptEvent
function acceptEvent(state, encoded)
Decode one bridge event. The original Windows Quake console consumes the character on key release; redirected stdin uses the same key-up encoding. The return value is [completedLine-or-void, echoText].
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
encoded | dynamic | — | encoded value consumed by this operation. |
View source
# close
function close(state)
Release only a console allocated by the shared bridge.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# CONSOLE_CAPACITY
const CONSOLE_CAPACITY = 256
Defines the console capacity constant used by the miniquake2 platform dedicated console module.
View source
# create
function create()
Create an isolated console decoder. Native allocation remains explicit so unit tests can exercise the byte-for-byte input policy without host I/O.
View source
miniquake2.platform.dedicated_console.DedicatedConsoleState struct
# EVENT_KEY_DOWN
const EVENT_KEY_DOWN = 65536
Defines the event key down constant used by the miniquake2 platform dedicated console module.
View source
# EVENT_PRESENT
const EVENT_PRESENT = 2147483648
Defines the event present constant used by the miniquake2 platform dedicated console module.
View source
# open
function open(state)
Attach to the process console, allocating one only when the executable does not already own a usable standard-output handle.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# poll
function poll(state)
Drain all currently pending native events without blocking the 10 Hz server frame. More than one complete redirected-input line may be available.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# write
function write(state, text)
Write operator output through the console-safe bridge.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
text | dynamic | — | Text consumed by the operation. |
View source