mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-12-26 02:25:13 +00:00
Guard _PSP_FW_VERSION macro to mitigate warnings with -Wundef
Fixes #123. Guards `_PSP_FW_VERSION` references with `#if defined()` to avoid the SDK headers returning warnings when compiling modules with the `-Wundef` cflag.
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
|
||||
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);
|
||||
#endif
|
||||
|
||||
@@ -231,7 +231,7 @@ void initSavedata(SceUtilitySavedataParam * savedata, int mode)
|
||||
savedata->overwrite = 1;
|
||||
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);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <pspnet_inet.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);
|
||||
#else
|
||||
PSP_MODULE_INFO("Net Dialog Sample", 0x1000, 1, 1);
|
||||
@@ -281,7 +281,7 @@ int user_thread(SceSize args, void *argp)
|
||||
/* main routine */
|
||||
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_INET);
|
||||
|
||||
Reference in New Issue
Block a user