mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-07 03:04:05 +00:00
[client] all: move keybind implementation into app.c/h
This commit is contained in:
@@ -22,6 +22,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "common/option.h"
|
||||
#include "common/locking.h"
|
||||
|
||||
#include "app.h"
|
||||
#include "texture.h"
|
||||
#include "shader.h"
|
||||
#include "model.h"
|
||||
@@ -29,8 +30,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "interface/app.h"
|
||||
|
||||
// these headers are auto generated by cmake
|
||||
#include "desktop.vert.h"
|
||||
#include "desktop_rgb.frag.h"
|
||||
@@ -62,12 +61,11 @@ struct EGL_Desktop
|
||||
struct DesktopShader shader_generic;
|
||||
|
||||
// night vision
|
||||
KeybindHandle kbNV;
|
||||
int nvMax;
|
||||
int nvGain;
|
||||
int nvMax;
|
||||
int nvGain;
|
||||
|
||||
// colorblind mode
|
||||
int cbMode;
|
||||
int cbMode;
|
||||
};
|
||||
|
||||
// forwards
|
||||
@@ -136,7 +134,7 @@ bool egl_desktop_init(EGL_Desktop ** desktop, EGLDisplay * display)
|
||||
egl_model_set_default((*desktop)->model);
|
||||
egl_model_set_texture((*desktop)->model, (*desktop)->texture);
|
||||
|
||||
(*desktop)->kbNV = app_register_keybind(KEY_N, egl_desktop_toggle_nv, *desktop);
|
||||
app_registerKeybind(KEY_N, egl_desktop_toggle_nv, *desktop);
|
||||
|
||||
(*desktop)->nvMax = option_get_int("egl", "nvGainMax");
|
||||
(*desktop)->nvGain = option_get_int("egl", "nvGain" );
|
||||
@@ -166,8 +164,6 @@ void egl_desktop_free(EGL_Desktop ** desktop)
|
||||
egl_shader_free (&(*desktop)->shader_generic.shader);
|
||||
egl_model_free (&(*desktop)->model );
|
||||
|
||||
app_release_keybind(&(*desktop)->kbNV);
|
||||
|
||||
free(*desktop);
|
||||
*desktop = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user