PS2SDK
PS2 Homebrew Libraries
libosd_common.c
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Licenced under Academic Free License version 2.0
7 # Review ps2sdk README & LICENSE files for further details.
8 */
9 
16 #include <kernel.h>
17 #include <syscallnr.h>
18 #include <osd_config.h>
19 
20 int PatchIsNeeded(void)
21 {
22  ConfigParam original_config, config;
23 
24  GetOsdConfigParam(&original_config);
25  config = original_config;
26  config.version = 1; // Protokernels cannot retain values set in this field.
27  SetOsdConfigParam(&config);
28  GetOsdConfigParam(&config);
29  SetOsdConfigParam(&original_config);
30 
31  return (config.version < 1);
32 }
kernel.h
ConfigParam
Definition: osd_config.h:82
ConfigParam::version
u32 version
Definition: osd_config.h:95
syscallnr.h
osd_config.h