mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] rename state
to g_state
This commit is contained in:
parent
6878eee40a
commit
f7d7fbdb73
@ -23,7 +23,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
void app_alert(LG_MsgAlert type, const char * fmt, ...)
|
void app_alert(LG_MsgAlert type, const char * fmt, ...)
|
||||||
{
|
{
|
||||||
if (!state.lgr || !params.showAlerts)
|
if (!g_state.lgr || !params.showAlerts)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
va_list args;
|
va_list args;
|
||||||
@ -36,8 +36,8 @@ void app_alert(LG_MsgAlert type, const char * fmt, ...)
|
|||||||
vsnprintf(buffer, length + 1, fmt, args);
|
vsnprintf(buffer, length + 1, fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
state.lgr->on_alert(
|
g_state.lgr->on_alert(
|
||||||
state.lgrData,
|
g_state.lgrData,
|
||||||
type,
|
type,
|
||||||
buffer,
|
buffer,
|
||||||
NULL
|
NULL
|
||||||
@ -49,7 +49,7 @@ void app_alert(LG_MsgAlert type, const char * fmt, ...)
|
|||||||
KeybindHandle app_register_keybind(SDL_Scancode key, SuperEventFn callback, void * opaque)
|
KeybindHandle app_register_keybind(SDL_Scancode key, SuperEventFn callback, void * opaque)
|
||||||
{
|
{
|
||||||
// don't allow duplicate binds
|
// don't allow duplicate binds
|
||||||
if (state.bindings[key])
|
if (g_state.bindings[key])
|
||||||
{
|
{
|
||||||
DEBUG_INFO("Key already bound");
|
DEBUG_INFO("Key already bound");
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -60,7 +60,7 @@ KeybindHandle app_register_keybind(SDL_Scancode key, SuperEventFn callback, void
|
|||||||
handle->callback = callback;
|
handle->callback = callback;
|
||||||
handle->opaque = opaque;
|
handle->opaque = opaque;
|
||||||
|
|
||||||
state.bindings[key] = handle;
|
g_state.bindings[key] = handle;
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ void app_release_keybind(KeybindHandle * handle)
|
|||||||
if (!*handle)
|
if (!*handle)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
state.bindings[(*handle)->key] = NULL;
|
g_state.bindings[(*handle)->key] = NULL;
|
||||||
free(*handle);
|
free(*handle);
|
||||||
*handle = NULL;
|
*handle = NULL;
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
@ -215,5 +215,5 @@ struct CursorState
|
|||||||
};
|
};
|
||||||
|
|
||||||
// forwards
|
// forwards
|
||||||
extern struct AppState state;
|
extern struct AppState g_state;
|
||||||
extern struct AppParams params;
|
extern struct AppParams params;
|
||||||
|
Loading…
Reference in New Issue
Block a user