mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 14:03:40 +00:00
[client] egl: cosmetics
This commit is contained in:
parent
dc0b3a8d45
commit
c3a143732c
@ -94,7 +94,7 @@ struct EGL_Desktop
|
|||||||
};
|
};
|
||||||
|
|
||||||
// forwards
|
// forwards
|
||||||
void egl_desktop_toggle_nv(int key, void * opaque);
|
void toggleNV(int key, void * opaque);
|
||||||
|
|
||||||
static bool egl_initDesktopShader(
|
static bool egl_initDesktopShader(
|
||||||
struct DesktopShader * shader,
|
struct DesktopShader * shader,
|
||||||
@ -179,7 +179,7 @@ bool egl_desktopInit(EGL * egl, EGL_Desktop ** desktop_, EGLDisplay * display,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
app_registerKeybind(KEY_N, egl_desktop_toggle_nv, desktop,
|
app_registerKeybind(KEY_N, toggleNV, desktop,
|
||||||
"Toggle night vision mode");
|
"Toggle night vision mode");
|
||||||
|
|
||||||
desktop->nvMax = option_get_int("egl", "nvGainMax");
|
desktop->nvMax = option_get_int("egl", "nvGainMax");
|
||||||
@ -226,7 +226,7 @@ bool egl_desktopInit(EGL * egl, EGL_Desktop ** desktop_, EGLDisplay * display,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void egl_desktop_toggle_nv(int key, void * opaque)
|
void toggleNV(int key, void * opaque)
|
||||||
{
|
{
|
||||||
EGL_Desktop * desktop = (EGL_Desktop *)opaque;
|
EGL_Desktop * desktop = (EGL_Desktop *)opaque;
|
||||||
if (desktop->nvGain++ == desktop->nvMax)
|
if (desktop->nvGain++ == desktop->nvMax)
|
||||||
@ -428,7 +428,7 @@ bool egl_desktopSetup(EGL_Desktop * desktop, const LG_RendererFormat format)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool egl_desktop_update(EGL_Desktop * desktop, const FrameBuffer * frame, int dmaFd,
|
bool egl_desktopUpdate(EGL_Desktop * desktop, const FrameBuffer * frame, int dmaFd,
|
||||||
const FrameDamageRect * damageRects, int damageRectsCount)
|
const FrameDamageRect * damageRects, int damageRectsCount)
|
||||||
{
|
{
|
||||||
if (desktop->useDMA && dmaFd >= 0)
|
if (desktop->useDMA && dmaFd >= 0)
|
||||||
|
@ -43,7 +43,7 @@ void egl_desktopFree(EGL_Desktop ** desktop);
|
|||||||
|
|
||||||
void egl_desktopConfigUI(EGL_Desktop * desktop);
|
void egl_desktopConfigUI(EGL_Desktop * desktop);
|
||||||
bool egl_desktopSetup (EGL_Desktop * desktop, const LG_RendererFormat format);
|
bool egl_desktopSetup (EGL_Desktop * desktop, const LG_RendererFormat format);
|
||||||
bool egl_desktop_update(EGL_Desktop * desktop, const FrameBuffer * frame, int dmaFd,
|
bool egl_desktopUpdate(EGL_Desktop * desktop, const FrameBuffer * frame, int dmaFd,
|
||||||
const FrameDamageRect * damageRects, int damageRectsCount);
|
const FrameDamageRect * damageRects, int damageRectsCount);
|
||||||
void egl_desktopResize(EGL_Desktop * desktop, int width, int height);
|
void egl_desktopResize(EGL_Desktop * desktop, int width, int height);
|
||||||
bool egl_desktopRender(EGL_Desktop * desktop, const float x, const float y,
|
bool egl_desktopRender(EGL_Desktop * desktop, const float x, const float y,
|
||||||
|
@ -551,7 +551,7 @@ static bool egl_onFrame(LG_Renderer * renderer, const FrameBuffer * frame, int d
|
|||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
|
|
||||||
uint64_t start = nanotime();
|
uint64_t start = nanotime();
|
||||||
if (!egl_desktop_update(this->desktop, frame, dmaFd, damageRects, damageRectsCount))
|
if (!egl_desktopUpdate(this->desktop, frame, dmaFd, damageRects, damageRectsCount))
|
||||||
{
|
{
|
||||||
DEBUG_INFO("Failed to to update the desktop");
|
DEBUG_INFO("Failed to to update the desktop");
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user