PSP Networking refactor
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# Copyright (c) 2026 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||
PUBLIC
|
||||
systempsp.c
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Copyright (c) 2026 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "system/systempsp.h"
|
||||
|
||||
#define systemGetActiveDialogTypePlatform systemGetActiveDialogTypePSP
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Copyright (c) 2026 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#include "systempsp.h"
|
||||
|
||||
systemdialogtype_t systemGetActiveDialogTypePSP() {
|
||||
|
||||
|
||||
return SYSTEM_DIALOG_TYPE_NONE;
|
||||
}
|
||||
|
||||
int systemPSPGetLanguage() {
|
||||
int ret;
|
||||
sceUtilityGetSystemParamInt(PSP_SYSTEMPARAM_ID_INT_LANGUAGE, &ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int systemPSPGetCrossButtonSetting() {
|
||||
int ret;
|
||||
// See: https://pspdev.github.io/pspsdk/psputility__sysparam_8h.html#ab588fd5a14adc025f065e09325ffe729
|
||||
sceUtilityGetSystemParamInt(PSP_SYSTEMPARAM_ID_INT_UNKNOWN, &ret);
|
||||
return (
|
||||
ret == 1 ? PSP_UTILITY_ACCEPT_CROSS : PSP_UTILITY_ACCEPT_CIRCLE
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Copyright (c) 2026 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "system/system.h"
|
||||
#include <psputility.h>
|
||||
|
||||
/**
|
||||
* Returns which PSP system dialog is currently open (if any).
|
||||
*
|
||||
* @return Currently open system dialog type.
|
||||
*/
|
||||
systemdialogtype_t systemGetActiveDialogTypePSP();
|
||||
|
||||
/**
|
||||
* Returns the PSP_SYSTEMPARAM language for the current system.
|
||||
*
|
||||
* @return PSP_SYSTEMPARAM language value.
|
||||
*/
|
||||
int systemPSPGetLanguage();
|
||||
|
||||
/**
|
||||
* Returns the user's setting for the PSP "Cross Button" configuration, which
|
||||
* determines whether the "Cross" or "Circle" button is used for "Accept"
|
||||
* actions in system dialogs.
|
||||
*
|
||||
* @return PSP_UTILITY_ACCEPT_CROSS or PSP_UTILITY_ACCEPT_CIRCLE.
|
||||
*/
|
||||
int systemPSPGetCrossButtonSetting();
|
||||
Reference in New Issue
Block a user