mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-12-23 12:20:00 +00:00
Merge pull request #128 from MotoLegacy/undef-fix
Guard `_PSP_FW_VERSION` macro to mitigate warnings with `-Wundef`
This commit is contained in:
@@ -47,7 +47,7 @@ struct SceKernelLoadExecVSHParam {
|
|||||||
u32 unk5;
|
u32 unk5;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if _PSP_FW_VERSION < 200
|
#if defined(_PSP_FW_VERSION) && _PSP_FW_VERSION < 200
|
||||||
/**
|
/**
|
||||||
* Executes a new executable from a buffer.
|
* Executes a new executable from a buffer.
|
||||||
*
|
*
|
||||||
@@ -72,7 +72,7 @@ int sceKernelLoadExecBufferPlain(SceSize bufsize, void *buf, struct SceKernelLoa
|
|||||||
*/
|
*/
|
||||||
int sceKernelExitVSHVSH(struct SceKernelLoadExecVSHParam *param);
|
int sceKernelExitVSHVSH(struct SceKernelLoadExecVSHParam *param);
|
||||||
|
|
||||||
#if _PSP_FW_VERSION >= 200
|
#if defined(_PSP_FW_VERSION) && _PSP_FW_VERSION >= 200
|
||||||
/**
|
/**
|
||||||
* Restart the vsh (to be used by a kernel module)
|
* Restart the vsh (to be used by a kernel module)
|
||||||
*
|
*
|
||||||
@@ -141,7 +141,7 @@ int sceKernelLoadExecVSHMs2(const char *file, struct SceKernelLoadExecVSHParam *
|
|||||||
*/
|
*/
|
||||||
int sceKernelLoadExecVSHMs3(const char *file, struct SceKernelLoadExecVSHParam *param);
|
int sceKernelLoadExecVSHMs3(const char *file, struct SceKernelLoadExecVSHParam *param);
|
||||||
|
|
||||||
#if _PSP_FW_VERSION >= 300
|
#if defined(_PSP_FW_VERSION) && _PSP_FW_VERSION >= 300
|
||||||
/***
|
/***
|
||||||
* Executes a new executable from a memory stick.
|
* Executes a new executable from a memory stick.
|
||||||
* It is the function used by the firmware to execute psx games
|
* It is the function used by the firmware to execute psx games
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ typedef struct SceKernelThreadKInfo {
|
|||||||
int wakeupCount;
|
int wakeupCount;
|
||||||
/** Number of clock cycles run */
|
/** Number of clock cycles run */
|
||||||
SceKernelSysClock runClocks;
|
SceKernelSysClock runClocks;
|
||||||
#if _PSP_FW_VERSION >= 200
|
#if defined(_PSP_FW_VERSION) && _PSP_FW_VERSION >= 200
|
||||||
SceUInt unk3; /* Unknown extra field on later firmwares */
|
SceUInt unk3; /* Unknown extra field on later firmwares */
|
||||||
#endif
|
#endif
|
||||||
/** Interrupt preemption count */
|
/** Interrupt preemption count */
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
PSP_MODULE_INFO("Savedata Sample", 0, 1, 1);
|
PSP_MODULE_INFO("Savedata Sample", 0, 1, 1);
|
||||||
|
|
||||||
#if _PSP_FW_VERSION >= 200
|
#if defined(_PSP_FW_VERSION) && _PSP_FW_VERSION >= 200
|
||||||
PSP_HEAP_SIZE_KB(20480);
|
PSP_HEAP_SIZE_KB(20480);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ void initSavedata(SceUtilitySavedataParam * savedata, int mode)
|
|||||||
savedata->overwrite = 1;
|
savedata->overwrite = 1;
|
||||||
savedata->focus = PSP_UTILITY_SAVEDATA_FOCUS_LATEST; // Set initial focus to the newest file (for loading)
|
savedata->focus = PSP_UTILITY_SAVEDATA_FOCUS_LATEST; // Set initial focus to the newest file (for loading)
|
||||||
|
|
||||||
#if _PSP_FW_VERSION >= 200
|
#if defined(_PSP_FW_VERSION) && _PSP_FW_VERSION >= 200
|
||||||
strncpy(savedata->key, key, 16);
|
strncpy(savedata->key, key, 16);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#include <pspnet_inet.h>
|
#include <pspnet_inet.h>
|
||||||
#include <pspnet_apctl.h>
|
#include <pspnet_apctl.h>
|
||||||
|
|
||||||
#if _PSP_FW_VERSION >= 200
|
#if defined(_PSP_FW_VERSION) && _PSP_FW_VERSION >= 200
|
||||||
PSP_MODULE_INFO("Net Dialog Sample", 0, 1, 1);
|
PSP_MODULE_INFO("Net Dialog Sample", 0, 1, 1);
|
||||||
#else
|
#else
|
||||||
PSP_MODULE_INFO("Net Dialog Sample", 0x1000, 1, 1);
|
PSP_MODULE_INFO("Net Dialog Sample", 0x1000, 1, 1);
|
||||||
@@ -281,7 +281,7 @@ int user_thread(SceSize args, void *argp)
|
|||||||
/* main routine */
|
/* main routine */
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#if _PSP_FW_VERSION >= 200
|
#if defined(_PSP_FW_VERSION) && _PSP_FW_VERSION >= 200
|
||||||
sceUtilityLoadNetModule(PSP_NET_MODULE_COMMON);
|
sceUtilityLoadNetModule(PSP_NET_MODULE_COMMON);
|
||||||
|
|
||||||
sceUtilityLoadNetModule(PSP_NET_MODULE_INET);
|
sceUtilityLoadNetModule(PSP_NET_MODULE_INET);
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ SceSize sceKernelMaxFreeMemSize(void);
|
|||||||
*/
|
*/
|
||||||
int sceKernelDevkitVersion(void);
|
int sceKernelDevkitVersion(void);
|
||||||
|
|
||||||
#if _PSP_FW_VERSION >= 150
|
#if defined(_PSP_FW_VERSION) && _PSP_FW_VERSION >= 150
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Kernel printf function.
|
* Kernel printf function.
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ typedef struct SceUtilitySavedataParam
|
|||||||
/** unknown2: ? */
|
/** unknown2: ? */
|
||||||
int unknown2[4];
|
int unknown2[4];
|
||||||
|
|
||||||
#if _PSP_FW_VERSION >= 200
|
#if defined(_PSP_FW_VERSION) && _PSP_FW_VERSION >= 200
|
||||||
|
|
||||||
/** key: encrypt/decrypt key for save with firmware >= 2.00 */
|
/** key: encrypt/decrypt key for save with firmware >= 2.00 */
|
||||||
char key[16];
|
char key[16];
|
||||||
|
|||||||
Reference in New Issue
Block a user