The model structure now uses a pointer to a function that returns the pointer to the device structure, rather than a pointer to the device structure directly.

This commit is contained in:
OBattler
2017-09-02 15:46:21 +02:00
parent c81e5af8a0
commit be16ee33ba
6 changed files with 36 additions and 13 deletions

View File

@@ -579,7 +579,7 @@ static device_config_t pcjr_config[] =
/*This isn't really a device as such - more of a convenient way to hook in the
config information*/
device_t pcjr_device =
static device_t pcjr_device =
{
"IBM PCjr",
0,
@@ -591,3 +591,8 @@ device_t pcjr_device =
NULL,
pcjr_config
};
device_t *pcjr_get_device(void)
{
return &pcjr_device;
}

View File

@@ -1,2 +1,3 @@
extern device_t pcjr_video_device;
extern device_t pcjr_device;
device_t *pcjr_get_device(void);

View File

@@ -655,7 +655,7 @@ static device_config_t tandy_config[] =
/*These aren't really devices as such - more of a convenient way to hook in the
config information*/
device_t tandy1000_device =
static device_t tandy1000_device =
{
"Tandy 1000",
0,
@@ -667,7 +667,7 @@ device_t tandy1000_device =
NULL,
tandy_config
};
device_t tandy1000hx_device =
static device_t tandy1000hx_device =
{
"Tandy 1000HX",
0,
@@ -679,3 +679,13 @@ device_t tandy1000hx_device =
NULL,
tandy_config
};
device_t *tandy1000_get_device(void)
{
return &tandy1000_device;
}
device_t *tandy1000hx_get_device(void)
{
return &tandy1000hx_device;
}

View File

@@ -1,4 +1,4 @@
extern device_t tandy_device;
extern device_t tandy1000_device;
extern device_t tandy1000hx_device;
device_t *tandy1000_get_device(void);
device_t *tandy1000hx_get_device(void);