File: settings-common.h

package info (click to toggle)
libretro-beetle-psx 0.9.38.6%2Bgit20151019-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 2,460 kB
  • sloc: cpp: 23,112; ansic: 19,032; makefile: 244; xml: 12
file content (67 lines) | stat: -rw-r--r-- 1,381 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef _MDFN_SETTINGS_COMMON_H
#define _MDFN_SETTINGS_COMMON_H

#include <stdint.h>

typedef enum
{
   MDFNST_INT = 0,
   MDFNST_UINT,
   MDFNST_BOOL,
   MDFNST_FLOAT,
   MDFNST_STRING,
   MDFNST_ENUM,
   MDFNST_ALIAS
} MDFNSettingType;

#define MDFNSF_NOFLAGS		      0

#define MDFNSF_CAT_INPUT         (1 << 8)
#define MDFNSF_CAT_SOUND	      (1 << 9)
#define MDFNSF_CAT_VIDEO	      (1 << 10)

#define MDFNSF_EMU_STATE	      (1 << 17)
#define MDFNSF_UNTRUSTED_SAFE	   (1 << 18)

#define MDFNSF_SUPPRESS_DOC	   (1 << 19)
#define MDFNSF_COMMON_TEMPLATE	(1 << 20)

#define MDFNSF_REQUIRES_RELOAD	(1 << 24)
#define MDFNSF_REQUIRES_RESTART	(1 << 25)

typedef struct
{
   const char *string;
   int number;
   const char *description;
   const char *description_extra;
} MDFNSetting_EnumList;

typedef struct
{
   const char *name;
   uint32 flags;
   const char *description;
   const char *description_extra;

   MDFNSettingType type;
   const char *default_value;
   const char *minimum;
   const char *maximum;
   bool (*validate_func)(const char *name, const char *value);
   void (*ChangeNotification)(const char *name);
   const MDFNSetting_EnumList *enum_list;
} MDFNSetting;

typedef struct __MDFNCS
{
   char *name;
   char *value;
   char *game_override;
   const MDFNSetting *desc;
   void (*ChangeNotification)(const char *name);

   uint32_t name_hash;
} MDFNCS;

#endif