mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 09:32:52 +00:00
g_driver no longer a pointer
This commit is contained in:
parent
4d78dc4bdf
commit
c8c35ed8d3
18
driver.c
18
driver.c
@ -32,33 +32,21 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
static driver_t *g_driver = NULL;
|
||||
static driver_t g_driver;
|
||||
|
||||
void driver_free(void)
|
||||
{
|
||||
if (g_driver)
|
||||
free(g_driver);
|
||||
}
|
||||
|
||||
static driver_t *driver_new(void)
|
||||
{
|
||||
driver_t *driver = (driver_t*)calloc(1, sizeof(driver_t));
|
||||
|
||||
if (!driver)
|
||||
return NULL;
|
||||
|
||||
return driver;
|
||||
memset(&g_driver, 0, sizeof(g_driver));
|
||||
}
|
||||
|
||||
void driver_clear_state(void)
|
||||
{
|
||||
driver_free();
|
||||
g_driver = driver_new();
|
||||
}
|
||||
|
||||
driver_t *driver_get_ptr(void)
|
||||
{
|
||||
return g_driver;
|
||||
return &g_driver;
|
||||
}
|
||||
|
||||
#define HASH_LOCATION_DRIVER 0x09189689U
|
||||
|
Loading…
x
Reference in New Issue
Block a user