Search
lxdream.org :: lxdream/src/maple/maple.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/maple/maple.h
changeset 1072:d82e04e6d497
prev1034:7044e01148f0
author nkeynes
date Fri Sep 17 20:08:50 2010 +1000 (13 years ago)
permissions -rw-r--r--
last change Refactor shader management to support multiple programs, which are all
defined in the shaders.glsl, rather than split up into one file per
fragment.
file annotate diff log raw
1.1 --- a/src/maple/maple.h Wed Jun 24 02:41:12 2009 +0000
1.2 +++ b/src/maple/maple.h Fri Sep 17 20:08:50 2010 +1000
1.3 @@ -86,8 +86,8 @@
1.4 /* Some convenience methods for VMU handling */
1.5 #define MAPLE_IS_VMU(dev) ((dev)->device_class == &vmu_class)
1.6 #define MAPLE_IS_VMU_CLASS(clz) ((clz) == &vmu_class)
1.7 -#define MAPLE_VMU_NAME(dev) (((dev)->get_config(dev))[0].value)
1.8 -#define MAPLE_SET_VMU_NAME(dev,name) ((dev)->set_config_value((dev),0,(name)))
1.9 +#define MAPLE_VMU_NAME(dev) (((dev)->get_config(dev))->params[0].value)
1.10 +#define MAPLE_SET_VMU_NAME(dev,name) lxdream_set_config_value( (dev)->get_config(dev), 0 ,(name) )
1.11 #define MAPLE_VMU_HAS_NAME(d1,name) (MAPLE_VMU_NAME(d1) == NULL ? name == NULL : \
1.12 name != NULL && strcmp(MAPLE_VMU_NAME(d1),name) == 0)
1.13 #define MAPLE_IS_SAME_VMU(d1,d2) (MAPLE_VMU_NAME(d1) == NULL ? MAPLE_VMU_NAME(d2) == NULL : \
1.14 @@ -99,6 +99,7 @@
1.15 struct maple_device_class {
1.16 const char *name;
1.17 int flags;
1.18 +
1.19 maple_device_t (*new_device)();
1.20 };
1.21
1.22 @@ -110,8 +111,7 @@
1.23 maple_device_class_t device_class;
1.24 unsigned char ident[112];
1.25 unsigned char version[80];
1.26 - lxdream_config_entry_t (*get_config)(struct maple_device *dev);
1.27 - void (*set_config_value)(struct maple_device *dev, unsigned int key, const gchar *value);
1.28 + lxdream_config_group_t (*get_config)(struct maple_device *dev);
1.29 void (*attach)(struct maple_device *dev);
1.30 void (*detach)(struct maple_device *dev);
1.31 void (*destroy)(struct maple_device *dev);
1.32 @@ -142,8 +142,7 @@
1.33 maple_device_t maple_get_device( unsigned int port, unsigned int periph );
1.34 const struct maple_device_class *maple_get_device_class( const gchar *name );
1.35 const struct maple_device_class **maple_get_device_classes();
1.36 -lxdream_config_entry_t maple_get_device_config( maple_device_t dev );
1.37 -void maple_set_device_config_value( maple_device_t dev, unsigned int key, const gchar *value );
1.38 +lxdream_config_group_t maple_get_device_config( maple_device_t dev );
1.39
1.40 void maple_handle_buffer( uint32_t buffer );
1.41 void maple_attach_device( maple_device_t dev, unsigned int port, unsigned int periph );
1.42 @@ -152,6 +151,7 @@
1.43 void maple_reattach_all( );
1.44 gboolean maple_should_grab();
1.45
1.46 +
1.47 /**
1.48 * Default destroy implementation that just frees the dev memory.
1.49 */
.