Fix globals_store and globals_restore
This commit is contained in:
parent
24c1d796d9
commit
4913d4802c
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
||||||
#include "include/globals.h"
|
#include "include/globals.h"
|
||||||
|
@ -43,13 +44,11 @@ bool globals_init(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void globals_store(void) {
|
void globals_store(void) {
|
||||||
o_engine = *i_engine;
|
memcpy(&o_engine, i_engine, sizeof(cl_enginefunc_t));
|
||||||
o_client = *i_client;
|
memcpy(&o_client, i_client, sizeof(cl_clientfunc_t));
|
||||||
o_pmove = *i_pmove;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void globals_restore(void) {
|
void globals_restore(void) {
|
||||||
*i_engine = o_engine;
|
memcpy(i_engine, &o_engine, sizeof(cl_enginefunc_t));
|
||||||
*i_client = o_client;
|
memcpy(i_client, &o_client, sizeof(cl_clientfunc_t));
|
||||||
*i_pmove = o_pmove;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue