clean up and standardize types across the codebase, unify atomic operations, improve UTF-8 handling throughout the system, remove obsolete input and named queue interfaces, redesign process preparation and creation, tighten IPC and service boundaries, improve error handling and reliability, minor documentation cleanup, fix doom surfaces, fix panic in ini parsing.
This commit is contained in:
1 parent
899225f551
commit
c0ad63c27f
226 files changed
+6562
-4147
No files matched your search
@@ -1,5 +1,7 @@
|
||||
// Native logical-input client. RSSRV owns keyboard interpretation and pointer policy; this file speaks its Port protocol.
|
||||
|
||||
#include <ntlite/atomic.h>
|
||||
#include <stdbool.h>
|
||||
#include <ntlite/input_service.h>
|
||||
#include <ntlite/port.h>
|
||||
#include <ntlite/resource.h>
|
||||
@@ -7,7 +9,7 @@
|
||||
#include <intrin.h>
|
||||
#include <string.h>
|
||||
|
||||
static volatile long gDefaultInputSession;
|
||||
static volatile uint32_t gDefaultInputSession;
|
||||
static KSTATUS NtlInputGetDefaultSession(SYS_HANDLE* sessionOut);
|
||||
|
||||
// Connects to the RSSRV listener published at /Services/Input.
|
||||
@@ -152,9 +154,9 @@ KSTATUS NtlInputQueryState(SYS_HANDLE session, NTL_INPUT_STATE* stateOut) {
|
||||
// Returns one process-local cached input session, connecting it on first use.
|
||||
static KSTATUS NtlInputGetDefaultSession(SYS_HANDLE* sessionOut) {
|
||||
if (!sessionOut) return NTLSTATUS_INVALID_PARAMETER;
|
||||
long current = gDefaultInputSession;
|
||||
uint32_t current = gDefaultInputSession;
|
||||
if (current != 0) {
|
||||
*sessionOut = (SYS_HANDLE)(uint32_t)current;
|
||||
*sessionOut = (SYS_HANDLE)current;
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -162,10 +164,10 @@ static KSTATUS NtlInputGetDefaultSession(SYS_HANDLE* sessionOut) {
|
||||
KSTATUS status = NtlInputConnect(&created);
|
||||
if (!KSUCCESS(status)) return status;
|
||||
|
||||
long previous = _InterlockedCompareExchange(&gDefaultInputSession, (long)created, 0);
|
||||
uint32_t previous = NtlAtomicCompareExchangeU32(&gDefaultInputSession, created, 0);
|
||||
if (previous != 0) {
|
||||
(void)NtlInputClose(created);
|
||||
created = (SYS_HANDLE)(uint32_t)previous;
|
||||
created = (SYS_HANDLE)previous;
|
||||
}
|
||||
*sessionOut = created;
|
||||
return NTLSTATUS_SUCCESS;
|
||||
@@ -239,7 +241,7 @@ KSTATUS NtlInputQueryDefaultState(NTL_INPUT_STATE* stateOut) {
|
||||
}
|
||||
|
||||
// Returns the current RSSRV-owned logical pointer position.
|
||||
KSTATUS NtlInputGetMousePos(int* xOut, int* yOut) {
|
||||
KSTATUS NtlInputGetMousePos(int32_t* xOut, int32_t* yOut) {
|
||||
if (!xOut || !yOut) return NTLSTATUS_INVALID_PARAMETER;
|
||||
NTL_INPUT_STATE state;
|
||||
KSTATUS status = NtlInputQueryDefaultState(&state);
|
||||
|
||||
Reference in new issue
Block a user