RetroArch
conf.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------
2 
3 conf.h -- SYSCONF support
4 
5 Copyright (C) 2008
6 Hector Martin (marcan)
7 
8 This software is provided 'as-is', without any express or implied
9 warranty. In no event will the authors be held liable for any
10 damages arising from the use of this software.
11 
12 Permission is granted to anyone to use this software for any
13 purpose, including commercial applications, and to alter it and
14 redistribute it freely, subject to the following restrictions:
15 
16 1. The origin of this software must not be misrepresented; you
17 must not claim that you wrote the original software. If you use
18 this software in a product, an acknowledgment in the product
19 documentation would be appreciated but is not required.
20 
21 2. Altered source versions must be plainly marked as such, and
22 must not be misrepresented as being the original software.
23 
24 3. This notice may not be removed or altered from any source
25 distribution.
26 
27 -------------------------------------------------------------*/
28 
29 #ifndef __CONF_H__
30 #define __CONF_H__
31 
32 #if defined(HW_RVL)
33 
34 #include <gctypes.h>
35 #include <gcutil.h>
36 
37 #define CONF_EBADFILE -0x6001
38 #define CONF_ENOENT -0x6002
39 #define CONF_ETOOBIG -0x6003
40 #define CONF_ENOTINIT -0x6004
41 #define CONF_ENOTIMPL -0x6005
42 #define CONF_EBADVALUE -0x6006
43 #define CONF_ENOMEM -0x6007
44 #define CONF_ERR_OK 0
45 
46 #ifdef __cplusplus
47  extern "C" {
48 #endif /* __cplusplus */
49 
50 enum {
51  CONF_BIGARRAY = 1,
52  CONF_SMALLARRAY,
53  CONF_BYTE,
54  CONF_SHORT,
55  CONF_LONG,
56  CONF_BOOL = 7
57 };
58 
59 enum {
60  CONF_VIDEO_NTSC = 0,
61  CONF_VIDEO_PAL,
62  CONF_VIDEO_MPAL
63 };
64 
65 enum {
66  CONF_REGION_JP = 0,
67  CONF_REGION_US = 1,
68  CONF_REGION_EU = 2,
69  CONF_REGION_KR = 4,
70  CONF_REGION_CN = 5
71 };
72 
73 enum {
74  CONF_AREA_JPN = 0,
75  CONF_AREA_USA,
76  CONF_AREA_EUR,
77  CONF_AREA_AUS,
78  CONF_AREA_BRA,
79  CONF_AREA_TWN,
80  CONF_AREA_ROC,
81  CONF_AREA_KOR,
82  CONF_AREA_HKG,
83  CONF_AREA_ASI,
84  CONF_AREA_LTN,
85  CONF_AREA_SAF,
86  CONF_AREA_CHN
87 };
88 
89 enum {
90  CONF_SHUTDOWN_STANDBY = 0,
91  CONF_SHUTDOWN_IDLE
92 };
93 
94 enum {
95  CONF_LED_OFF = 0,
96  CONF_LED_DIM,
97  CONF_LED_BRIGHT
98 };
99 
100 enum {
101  CONF_SOUND_MONO = 0,
102  CONF_SOUND_STEREO,
103  CONF_SOUND_SURROUND
104 };
105 
106 enum {
107  CONF_LANG_JAPANESE = 0,
108  CONF_LANG_ENGLISH,
109  CONF_LANG_GERMAN,
110  CONF_LANG_FRENCH,
111  CONF_LANG_SPANISH,
112  CONF_LANG_ITALIAN,
113  CONF_LANG_DUTCH,
114  CONF_LANG_SIMP_CHINESE,
115  CONF_LANG_TRAD_CHINESE,
116  CONF_LANG_KOREAN
117 };
118 
119 enum {
120  CONF_ASPECT_4_3 = 0,
121  CONF_ASPECT_16_9
122 };
123 
124 enum {
125  CONF_SENSORBAR_BOTTOM = 0,
126  CONF_SENSORBAR_TOP
127 };
128 
129 #define CONF_PAD_MAX_REGISTERED 10
130 #define CONF_PAD_MAX_ACTIVE 4
131 
132 typedef struct _conf_pad_device conf_pad_device;
133 
134 struct _conf_pad_device {
135  u8 bdaddr[6];
136  char name[0x40];
138 
139 typedef struct _conf_pads conf_pads;
140 
141 struct _conf_pads {
142  u8 num_registered;
143  conf_pad_device registered[CONF_PAD_MAX_REGISTERED];
144  conf_pad_device active[CONF_PAD_MAX_ACTIVE];
145  conf_pad_device balance_board;
146  conf_pad_device unknown;
148 
149 s32 CONF_Init(void);
150 s32 CONF_GetLength(const char *name);
151 s32 CONF_GetType(const char *name);
152 s32 CONF_Get(const char *name, void *buffer, u32 length);
153 s32 CONF_GetShutdownMode(void);
154 s32 CONF_GetIdleLedMode(void);
155 s32 CONF_GetProgressiveScan(void);
156 s32 CONF_GetEuRGB60(void);
157 s32 CONF_GetIRSensitivity(void);
158 s32 CONF_GetSensorBarPosition(void);
159 s32 CONF_GetPadSpeakerVolume(void);
160 s32 CONF_GetPadMotorMode(void);
161 s32 CONF_GetSoundMode(void);
162 s32 CONF_GetLanguage(void);
163 s32 CONF_GetCounterBias(u32 *bias);
164 s32 CONF_GetScreenSaverMode(void);
165 s32 CONF_GetDisplayOffsetH(s8 *offset);
166 s32 CONF_GetPadDevices(conf_pads *pads);
167 s32 CONF_GetNickName(u8 *nickname);
168 s32 CONF_GetAspectRatio(void);
169 s32 CONF_GetEULA(void);
170 s32 CONF_GetParentalPassword(s8 *password);
171 s32 CONF_GetParentalAnswer(s8 *answer);
172 s32 CONF_GetWiiConnect24(void);
173 s32 CONF_GetRegion(void);
174 s32 CONF_GetArea(void);
175 s32 CONF_GetVideo(void);
176 
177 #ifdef __cplusplus
178  }
179 #endif /* __cplusplus */
180 
181 #endif
182 
183 #endif
GLuint const GLchar * name
Definition: glext.h:6671
int32_t s32
32bit signed integer
Definition: gctypes.h:24
static const unsigned char password[MAX_TESTS][32]
Definition: pkcs5.c:305
Data type definitions.
#define ATTRIBUTE_PACKED
Definition: gccore.h:95
int8_t s8
8bit signed integer
Definition: gctypes.h:22
GLfloat bias
Definition: glext.h:8812
Definition: video4linux2.c:51
GLintptr offset
Definition: glext.h:6560
uint8_t u8
8bit unsigned integer
Definition: gctypes.h:17
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
GLenum GLuint GLenum GLsizei length
Definition: glext.h:6233