mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-22 12:47:04 +00:00
[client] interface: refactor to use camlCase function names
This commit is contained in:
parent
d347b28481
commit
30ed563504
@ -27,16 +27,16 @@
|
|||||||
#include "common/framebuffer.h"
|
#include "common/framebuffer.h"
|
||||||
|
|
||||||
#define IS_LG_RENDERER_VALID(x) \
|
#define IS_LG_RENDERER_VALID(x) \
|
||||||
((x)->get_name && \
|
((x)->getName && \
|
||||||
(x)->create && \
|
(x)->create && \
|
||||||
(x)->initialize && \
|
(x)->initialize && \
|
||||||
(x)->deinitialize && \
|
(x)->deinitialize && \
|
||||||
(x)->on_restart && \
|
(x)->onRestart && \
|
||||||
(x)->on_resize && \
|
(x)->onResize && \
|
||||||
(x)->on_mouse_shape && \
|
(x)->onMouseShape && \
|
||||||
(x)->on_mouse_event && \
|
(x)->onMouseEvent && \
|
||||||
(x)->render_startup && \
|
(x)->renderStartup && \
|
||||||
(x)->needs_render && \
|
(x)->needsRender && \
|
||||||
(x)->render)
|
(x)->render)
|
||||||
|
|
||||||
typedef struct LG_RendererParams
|
typedef struct LG_RendererParams
|
||||||
@ -99,7 +99,7 @@ typedef struct LG_Renderer LG_Renderer;
|
|||||||
typedef struct LG_RendererOps
|
typedef struct LG_RendererOps
|
||||||
{
|
{
|
||||||
/* returns the friendly name of the renderer */
|
/* returns the friendly name of the renderer */
|
||||||
const char * (*get_name)(void);
|
const char * (*getName)(void);
|
||||||
|
|
||||||
/* called pre-creation to allow the renderer to register any options it may
|
/* called pre-creation to allow the renderer to register any options it may
|
||||||
* have */
|
* have */
|
||||||
@ -124,41 +124,41 @@ typedef struct LG_RendererOps
|
|||||||
|
|
||||||
/* called when the renderer is to reset it's state
|
/* called when the renderer is to reset it's state
|
||||||
* Context: lg_run & frameThread */
|
* Context: lg_run & frameThread */
|
||||||
void (*on_restart)(LG_Renderer * renderer);
|
void (*onRestart)(LG_Renderer * renderer);
|
||||||
|
|
||||||
/* called when the viewport has been resized
|
/* called when the viewport has been resized
|
||||||
* Context: renderThrtead */
|
* Context: renderThrtead */
|
||||||
void (*on_resize)(LG_Renderer * renderer, const int width, const int height,
|
void (*onResize)(LG_Renderer * renderer, const int width, const int height,
|
||||||
const double scale, const LG_RendererRect destRect,
|
const double scale, const LG_RendererRect destRect,
|
||||||
LG_RendererRotate rotate);
|
LG_RendererRotate rotate);
|
||||||
|
|
||||||
/* called when the mouse shape has changed
|
/* called when the mouse shape has changed
|
||||||
* Context: cursorThread */
|
* Context: cursorThread */
|
||||||
bool (*on_mouse_shape)(LG_Renderer * renderer, const LG_RendererCursor cursor,
|
bool (*onMouseShape)(LG_Renderer * renderer, const LG_RendererCursor cursor,
|
||||||
const int width, const int height, const int pitch, const uint8_t * data);
|
const int width, const int height, const int pitch, const uint8_t * data);
|
||||||
|
|
||||||
/* called when the mouse has moved or changed visibillity
|
/* called when the mouse has moved or changed visibillity
|
||||||
* Context: cursorThread */
|
* Context: cursorThread */
|
||||||
bool (*on_mouse_event)(LG_Renderer * renderer, const bool visible, const int x,
|
bool (*onMouseEvent)(LG_Renderer * renderer, const bool visible, const int x,
|
||||||
const int y);
|
const int y);
|
||||||
|
|
||||||
/* called when the frame format has changed
|
/* called when the frame format has changed
|
||||||
* Context: frameThread */
|
* Context: frameThread */
|
||||||
bool (*on_frame_format)(LG_Renderer * renderer,
|
bool (*onFrameFormat)(LG_Renderer * renderer,
|
||||||
const LG_RendererFormat format);
|
const LG_RendererFormat format);
|
||||||
|
|
||||||
/* called when there is a new frame
|
/* called when there is a new frame
|
||||||
* Context: frameThread */
|
* Context: frameThread */
|
||||||
bool (*on_frame)(LG_Renderer * renderer, const FrameBuffer * frame, int dmaFD,
|
bool (*onFrame)(LG_Renderer * renderer, const FrameBuffer * frame, int dmaFD,
|
||||||
const FrameDamageRect * damage, int damageCount);
|
const FrameDamageRect * damage, int damageCount);
|
||||||
|
|
||||||
/* called when the rederer is to startup
|
/* called when the rederer is to startup
|
||||||
* Context: renderThread */
|
* Context: renderThread */
|
||||||
bool (*render_startup)(LG_Renderer * renderer, bool useDMA);
|
bool (*renderStartup)(LG_Renderer * renderer, bool useDMA);
|
||||||
|
|
||||||
/* returns if the render method must be called even if nothing has changed.
|
/* returns if the render method must be called even if nothing has changed.
|
||||||
* Context: renderThread */
|
* Context: renderThread */
|
||||||
bool (*needs_render)(LG_Renderer * renderer);
|
bool (*needsRender)(LG_Renderer * renderer);
|
||||||
|
|
||||||
/* called to render the scene
|
/* called to render the scene
|
||||||
* Context: renderThread */
|
* Context: renderThread */
|
||||||
|
@ -184,7 +184,7 @@ static struct Option egl_options[] =
|
|||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char * egl_get_name(void)
|
static const char * egl_getName(void)
|
||||||
{
|
{
|
||||||
return "EGL";
|
return "EGL";
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ static bool egl_supports(LG_Renderer * renderer, LG_RendererSupport flag)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void egl_on_restart(LG_Renderer * renderer)
|
static void egl_onRestart(LG_Renderer * renderer)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
|
|
||||||
@ -400,7 +400,7 @@ static void egl_update_scale_type(struct Inst * this)
|
|||||||
this->scaleType = EGL_DESKTOP_UPSCALE;
|
this->scaleType = EGL_DESKTOP_UPSCALE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void egl_on_resize(LG_Renderer * renderer, const int width, const int height, const double scale,
|
static void egl_onResize(LG_Renderer * renderer, const int width, const int height, const double scale,
|
||||||
const LG_RendererRect destRect, LG_RendererRotate rotate)
|
const LG_RendererRect destRect, LG_RendererRotate rotate)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
@ -447,7 +447,7 @@ static void egl_on_resize(LG_Renderer * renderer, const int width, const int hei
|
|||||||
egl_damage_resize(this->damage, this->translateX, this->translateY, this->scaleX, this->scaleY);
|
egl_damage_resize(this->damage, this->translateX, this->translateY, this->scaleX, this->scaleY);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool egl_on_mouse_shape(LG_Renderer * renderer, const LG_RendererCursor cursor,
|
static bool egl_onMouseShape(LG_Renderer * renderer, const LG_RendererCursor cursor,
|
||||||
const int width, const int height,
|
const int width, const int height,
|
||||||
const int pitch, const uint8_t * data)
|
const int pitch, const uint8_t * data)
|
||||||
{
|
{
|
||||||
@ -466,7 +466,7 @@ static bool egl_on_mouse_shape(LG_Renderer * renderer, const LG_RendererCursor c
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool egl_on_mouse_event(LG_Renderer * renderer, const bool visible, const int x, const int y)
|
static bool egl_onMouseEvent(LG_Renderer * renderer, const bool visible, const int x, const int y)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
this->cursorVisible = visible;
|
this->cursorVisible = visible;
|
||||||
@ -476,7 +476,7 @@ static bool egl_on_mouse_event(LG_Renderer * renderer, const bool visible, const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool egl_on_frame_format(LG_Renderer * renderer, const LG_RendererFormat format)
|
static bool egl_onFrameFormat(LG_Renderer * renderer, const LG_RendererFormat format)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
memcpy(&this->format, &format, sizeof(LG_RendererFormat));
|
memcpy(&this->format, &format, sizeof(LG_RendererFormat));
|
||||||
@ -509,7 +509,7 @@ static bool egl_on_frame_format(LG_Renderer * renderer, const LG_RendererFormat
|
|||||||
return egl_desktop_setup(this->desktop, format);
|
return egl_desktop_setup(this->desktop, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool egl_on_frame(LG_Renderer * renderer, const FrameBuffer * frame, int dmaFd,
|
static bool egl_onFrame(LG_Renderer * renderer, const FrameBuffer * frame, int dmaFd,
|
||||||
const FrameDamageRect * damageRects, int damageRectsCount)
|
const FrameDamageRect * damageRects, int damageRectsCount)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
@ -624,7 +624,7 @@ static void egl_config_ui(void * opaque)
|
|||||||
egl_desktop_config_ui(this->desktop);
|
egl_desktop_config_ui(this->desktop);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool egl_render_startup(LG_Renderer * renderer, bool useDMA)
|
static bool egl_renderStartup(LG_Renderer * renderer, bool useDMA)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
|
|
||||||
@ -818,7 +818,7 @@ static bool egl_render_startup(LG_Renderer * renderer, bool useDMA)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool egl_needs_render(LG_Renderer * renderer)
|
static bool egl_needsRender(LG_Renderer * renderer)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
return !this->waitDone;
|
return !this->waitDone;
|
||||||
@ -1070,19 +1070,19 @@ static bool egl_render(LG_Renderer * renderer, LG_RendererRotate rotate,
|
|||||||
|
|
||||||
struct LG_RendererOps LGR_EGL =
|
struct LG_RendererOps LGR_EGL =
|
||||||
{
|
{
|
||||||
.get_name = egl_get_name,
|
.getName = egl_getName,
|
||||||
.setup = egl_setup,
|
.setup = egl_setup,
|
||||||
.create = egl_create,
|
.create = egl_create,
|
||||||
.initialize = egl_initialize,
|
.initialize = egl_initialize,
|
||||||
.deinitialize = egl_deinitialize,
|
.deinitialize = egl_deinitialize,
|
||||||
.supports = egl_supports,
|
.supports = egl_supports,
|
||||||
.on_restart = egl_on_restart,
|
.onRestart = egl_onRestart,
|
||||||
.on_resize = egl_on_resize,
|
.onResize = egl_onResize,
|
||||||
.on_mouse_shape = egl_on_mouse_shape,
|
.onMouseShape = egl_onMouseShape,
|
||||||
.on_mouse_event = egl_on_mouse_event,
|
.onMouseEvent = egl_onMouseEvent,
|
||||||
.on_frame_format = egl_on_frame_format,
|
.onFrameFormat = egl_onFrameFormat,
|
||||||
.on_frame = egl_on_frame,
|
.onFrame = egl_onFrame,
|
||||||
.render_startup = egl_render_startup,
|
.renderStartup = egl_renderStartup,
|
||||||
.needs_render = egl_needs_render,
|
.needsRender = egl_needsRender,
|
||||||
.render = egl_render
|
.render = egl_render
|
||||||
};
|
};
|
||||||
|
@ -179,7 +179,7 @@ static bool draw_frame(struct Inst * this);
|
|||||||
static void draw_mouse(struct Inst * this);
|
static void draw_mouse(struct Inst * this);
|
||||||
static void render_wait(struct Inst * this);
|
static void render_wait(struct Inst * this);
|
||||||
|
|
||||||
const char * opengl_get_name(void)
|
const char * opengl_getName(void)
|
||||||
{
|
{
|
||||||
return "OpenGL";
|
return "OpenGL";
|
||||||
}
|
}
|
||||||
@ -261,14 +261,14 @@ void opengl_deinitialize(LG_Renderer * renderer)
|
|||||||
free(this);
|
free(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void opengl_on_restart(LG_Renderer * renderer)
|
void opengl_onRestart(LG_Renderer * renderer)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
|
|
||||||
this->waiting = true;
|
this->waiting = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void opengl_on_resize(LG_Renderer * renderer, const int width, const int height, const double scale,
|
void opengl_onResize(LG_Renderer * renderer, const int width, const int height, const double scale,
|
||||||
const LG_RendererRect destRect, LG_RendererRotate rotate)
|
const LG_RendererRect destRect, LG_RendererRotate rotate)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
@ -310,7 +310,7 @@ void opengl_on_resize(LG_Renderer * renderer, const int width, const int height,
|
|||||||
ImGui_ImplOpenGL2_NewFrame();
|
ImGui_ImplOpenGL2_NewFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool opengl_on_mouse_shape(LG_Renderer * renderer, const LG_RendererCursor cursor,
|
bool opengl_onMouseShape(LG_Renderer * renderer, const LG_RendererCursor cursor,
|
||||||
const int width, const int height, const int pitch, const uint8_t * data)
|
const int width, const int height, const int pitch, const uint8_t * data)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
@ -337,7 +337,7 @@ bool opengl_on_mouse_shape(LG_Renderer * renderer, const LG_RendererCursor curso
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool opengl_on_mouse_event(LG_Renderer * renderer, const bool visible, const int x, const int y)
|
bool opengl_onMouseEvent(LG_Renderer * renderer, const bool visible, const int x, const int y)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
|
|
||||||
@ -351,7 +351,7 @@ bool opengl_on_mouse_event(LG_Renderer * renderer, const bool visible, const int
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool opengl_on_frame_format(LG_Renderer * renderer, const LG_RendererFormat format)
|
bool opengl_onFrameFormat(LG_Renderer * renderer, const LG_RendererFormat format)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ bool opengl_on_frame_format(LG_Renderer * renderer, const LG_RendererFormat form
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool opengl_on_frame(LG_Renderer * renderer, const FrameBuffer * frame, int dmaFd,
|
bool opengl_onFrame(LG_Renderer * renderer, const FrameBuffer * frame, int dmaFd,
|
||||||
const FrameDamageRect * damage, int damageCount)
|
const FrameDamageRect * damage, int damageCount)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
@ -387,7 +387,7 @@ bool opengl_on_frame(LG_Renderer * renderer, const FrameBuffer * frame, int dmaF
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool opengl_render_startup(LG_Renderer * renderer, bool useDMA)
|
bool opengl_renderStartup(LG_Renderer * renderer, bool useDMA)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
|
|
||||||
@ -450,7 +450,7 @@ bool opengl_render_startup(LG_Renderer * renderer, bool useDMA)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool opengl_needs_render(LG_Renderer * renderer)
|
static bool opengl_needsRender(LG_Renderer * renderer)
|
||||||
{
|
{
|
||||||
struct Inst * this = UPCAST(struct Inst, renderer);
|
struct Inst * this = UPCAST(struct Inst, renderer);
|
||||||
return !this->waitDone;
|
return !this->waitDone;
|
||||||
@ -604,20 +604,20 @@ static void render_wait(struct Inst * this)
|
|||||||
|
|
||||||
const LG_RendererOps LGR_OpenGL =
|
const LG_RendererOps LGR_OpenGL =
|
||||||
{
|
{
|
||||||
.get_name = opengl_get_name,
|
.getName = opengl_getName,
|
||||||
.setup = opengl_setup,
|
.setup = opengl_setup,
|
||||||
|
|
||||||
.create = opengl_create,
|
.create = opengl_create,
|
||||||
.initialize = opengl_initialize,
|
.initialize = opengl_initialize,
|
||||||
.deinitialize = opengl_deinitialize,
|
.deinitialize = opengl_deinitialize,
|
||||||
.on_restart = opengl_on_restart,
|
.onRestart = opengl_onRestart,
|
||||||
.on_resize = opengl_on_resize,
|
.onResize = opengl_onResize,
|
||||||
.on_mouse_shape = opengl_on_mouse_shape,
|
.onMouseShape = opengl_onMouseShape,
|
||||||
.on_mouse_event = opengl_on_mouse_event,
|
.onMouseEvent = opengl_onMouseEvent,
|
||||||
.on_frame_format = opengl_on_frame_format,
|
.onFrameFormat = opengl_onFrameFormat,
|
||||||
.on_frame = opengl_on_frame,
|
.onFrame = opengl_onFrame,
|
||||||
.render_startup = opengl_render_startup,
|
.renderStartup = opengl_renderStartup,
|
||||||
.needs_render = opengl_needs_render,
|
.needsRender = opengl_needsRender,
|
||||||
.render = opengl_render
|
.render = opengl_render
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -674,7 +674,7 @@ static bool optRendererParse(struct Option * opt, const char * str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(unsigned int i = 0; i < LG_RENDERER_COUNT; ++i)
|
for(unsigned int i = 0; i < LG_RENDERER_COUNT; ++i)
|
||||||
if (strcasecmp(str, LG_Renderers[i]->get_name()) == 0)
|
if (strcasecmp(str, LG_Renderers[i]->getName()) == 0)
|
||||||
{
|
{
|
||||||
g_params.forceRenderer = true;
|
g_params.forceRenderer = true;
|
||||||
g_params.forceRendererIndex = i;
|
g_params.forceRendererIndex = i;
|
||||||
@ -690,7 +690,7 @@ static StringList optRendererValues(struct Option * opt)
|
|||||||
|
|
||||||
// this typecast is safe as the stringlist doesn't own the values
|
// this typecast is safe as the stringlist doesn't own the values
|
||||||
for(unsigned int i = 0; i < LG_RENDERER_COUNT; ++i)
|
for(unsigned int i = 0; i < LG_RENDERER_COUNT; ++i)
|
||||||
stringlist_push(sl, (char *)LG_Renderers[i]->get_name());
|
stringlist_push(sl, (char *)LG_Renderers[i]->getName());
|
||||||
|
|
||||||
return sl;
|
return sl;
|
||||||
}
|
}
|
||||||
@ -703,7 +703,7 @@ static char * optRendererToString(struct Option * opt)
|
|||||||
if (g_params.forceRendererIndex >= LG_RENDERER_COUNT)
|
if (g_params.forceRendererIndex >= LG_RENDERER_COUNT)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return strdup(LG_Renderers[g_params.forceRendererIndex]->get_name());
|
return strdup(LG_Renderers[g_params.forceRendererIndex]->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool optPosParse(struct Option * opt, const char * str)
|
static bool optPosParse(struct Option * opt, const char * str)
|
||||||
|
@ -147,7 +147,7 @@ static void preSwapCallback(void * udata)
|
|||||||
|
|
||||||
static int renderThread(void * unused)
|
static int renderThread(void * unused)
|
||||||
{
|
{
|
||||||
if (!RENDERER(render_startup, g_state.useDMA))
|
if (!RENDERER(renderStartup, g_state.useDMA))
|
||||||
{
|
{
|
||||||
g_state.state = APP_STATE_SHUTDOWN;
|
g_state.state = APP_STATE_SHUTDOWN;
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ static int renderThread(void * unused)
|
|||||||
&& !forceRender
|
&& !forceRender
|
||||||
&& !pending
|
&& !pending
|
||||||
&& !app_overlayNeedsRender()
|
&& !app_overlayNeedsRender()
|
||||||
&& !RENDERER(needs_render))
|
&& !RENDERER(needsRender))
|
||||||
{
|
{
|
||||||
if (g_state.ds->skipFrame)
|
if (g_state.ds->skipFrame)
|
||||||
g_state.ds->skipFrame();
|
g_state.ds->skipFrame();
|
||||||
@ -235,7 +235,7 @@ static int renderThread(void * unused)
|
|||||||
DEBUG_FATAL("Failed to build font atlas: %s (%s)", g_params.uiFont, g_state.fontName);
|
DEBUG_FATAL("Failed to build font atlas: %s (%s)", g_params.uiFont, g_state.fontName);
|
||||||
|
|
||||||
if (g_state.lgr)
|
if (g_state.lgr)
|
||||||
RENDERER(on_resize, g_state.windowW, g_state.windowH,
|
RENDERER(onResize, g_state.windowW, g_state.windowH,
|
||||||
g_state.windowScale, g_state.dstRect, g_params.winRotate);
|
g_state.windowScale, g_state.dstRect, g_params.winRotate);
|
||||||
atomic_compare_exchange_weak(&g_state.lgrResize, &resize, 0);
|
atomic_compare_exchange_weak(&g_state.lgrResize, &resize, 0);
|
||||||
}
|
}
|
||||||
@ -337,7 +337,7 @@ static int cursorThread(void * unused)
|
|||||||
if (g_cursor.redraw && g_cursor.guest.valid)
|
if (g_cursor.redraw && g_cursor.guest.valid)
|
||||||
{
|
{
|
||||||
g_cursor.redraw = false;
|
g_cursor.redraw = false;
|
||||||
RENDERER(on_mouse_event,
|
RENDERER(onMouseEvent,
|
||||||
g_cursor.guest.visible && (g_cursor.draw || !g_params.useSpiceInput),
|
g_cursor.guest.visible && (g_cursor.draw || !g_params.useSpiceInput),
|
||||||
g_cursor.guest.x,
|
g_cursor.guest.x,
|
||||||
g_cursor.guest.y
|
g_cursor.guest.y
|
||||||
@ -400,7 +400,7 @@ static int cursorThread(void * unused)
|
|||||||
g_cursor.guest.hy = cursor->hy;
|
g_cursor.guest.hy = cursor->hy;
|
||||||
|
|
||||||
const uint8_t * data = (const uint8_t *)(cursor + 1);
|
const uint8_t * data = (const uint8_t *)(cursor + 1);
|
||||||
if (!RENDERER(on_mouse_shape,
|
if (!RENDERER(onMouseShape,
|
||||||
cursorType,
|
cursorType,
|
||||||
cursor->width,
|
cursor->width,
|
||||||
cursor->height,
|
cursor->height,
|
||||||
@ -433,7 +433,7 @@ static int cursorThread(void * unused)
|
|||||||
|
|
||||||
g_cursor.redraw = false;
|
g_cursor.redraw = false;
|
||||||
|
|
||||||
RENDERER(on_mouse_event,
|
RENDERER(onMouseEvent,
|
||||||
g_cursor.guest.visible && (g_cursor.draw || !g_params.useSpiceInput),
|
g_cursor.guest.visible && (g_cursor.draw || !g_params.useSpiceInput),
|
||||||
g_cursor.guest.x,
|
g_cursor.guest.x,
|
||||||
g_cursor.guest.y
|
g_cursor.guest.y
|
||||||
@ -610,7 +610,7 @@ int main_frameThread(void * unused)
|
|||||||
frame->rotation);
|
frame->rotation);
|
||||||
|
|
||||||
LG_LOCK(g_state.lgrLock);
|
LG_LOCK(g_state.lgrLock);
|
||||||
if (!RENDERER(on_frame_format, lgrFormat))
|
if (!RENDERER(onFrameFormat, lgrFormat))
|
||||||
{
|
{
|
||||||
DEBUG_ERROR("renderer failed to configure format");
|
DEBUG_ERROR("renderer failed to configure format");
|
||||||
g_state.state = APP_STATE_SHUTDOWN;
|
g_state.state = APP_STATE_SHUTDOWN;
|
||||||
@ -677,7 +677,7 @@ int main_frameThread(void * unused)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FrameBuffer * fb = (FrameBuffer *)(((uint8_t*)frame) + frame->offset);
|
FrameBuffer * fb = (FrameBuffer *)(((uint8_t*)frame) + frame->offset);
|
||||||
if (!RENDERER(on_frame, fb, g_state.useDMA ? dma->fd : -1,
|
if (!RENDERER(onFrame, fb, g_state.useDMA ? dma->fd : -1,
|
||||||
frame->damageRects, frame->damageRectsCount))
|
frame->damageRects, frame->damageRectsCount))
|
||||||
{
|
{
|
||||||
lgmpClientMessageDone(queue);
|
lgmpClientMessageDone(queue);
|
||||||
@ -717,7 +717,7 @@ int main_frameThread(void * unused)
|
|||||||
}
|
}
|
||||||
|
|
||||||
lgmpClientUnsubscribe(&queue);
|
lgmpClientUnsubscribe(&queue);
|
||||||
RENDERER(on_restart);
|
RENDERER(onRestart);
|
||||||
|
|
||||||
if (g_state.useDMA)
|
if (g_state.useDMA)
|
||||||
{
|
{
|
||||||
@ -799,7 +799,7 @@ static bool tryRenderer(const int index, const LG_RendererParams lgrParams,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_INFO("Using Renderer: %s", r->get_name());
|
DEBUG_INFO("Using Renderer: %s", r->getName());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1173,7 +1173,7 @@ restart:
|
|||||||
|
|
||||||
lgInit();
|
lgInit();
|
||||||
|
|
||||||
RENDERER(on_restart);
|
RENDERER(onRestart);
|
||||||
|
|
||||||
DEBUG_INFO("Waiting for the host to restart...");
|
DEBUG_INFO("Waiting for the host to restart...");
|
||||||
goto restart;
|
goto restart;
|
||||||
|
Loading…
Reference in New Issue
Block a user