[client] interface: rename LG_Renderer to LG_RendererOps

Part of the standardisation of using the `Ops` suffix for all interfaces
This commit is contained in:
Geoffrey McRae 2021-08-08 14:43:04 +10:00
parent 1a8267d55a
commit 45d1f27fb4
6 changed files with 9 additions and 9 deletions

View file

@ -94,7 +94,7 @@ typedef enum LG_RendererCursor
}
LG_RendererCursor;
typedef struct LG_Renderer
typedef struct LG_RendererOps
{
/* returns the friendly name of the renderer */
const char * (*get_name)(void);
@ -163,4 +163,4 @@ typedef struct LG_Renderer
bool (*render)(void * opaque, LG_RendererRotate rotate, const bool newFrame,
const bool invalidateWindow, void (*preSwap)(void * udata), void * udata);
}
LG_Renderer;
LG_RendererOps;

View file

@ -5,7 +5,7 @@ set(RENDERER_H "${CMAKE_BINARY_DIR}/include/dynamic/renderers.h")
set(RENDERER_C "${CMAKE_BINARY_DIR}/src/renderers.c")
file(WRITE ${RENDERER_H} "#include \"interface/renderer.h\"\n\n")
file(APPEND ${RENDERER_H} "extern LG_Renderer * LG_Renderers[];\n\n")
file(APPEND ${RENDERER_H} "extern LG_RendererOps * LG_Renderers[];\n\n")
file(WRITE ${RENDERER_C} "#include \"interface/renderer.h\"\n\n")
file(APPEND ${RENDERER_C} "#include <stddef.h>\n\n")
@ -33,10 +33,10 @@ list(LENGTH RENDERERS RENDERER_COUNT)
file(APPEND ${RENDERER_H} "#define LG_RENDERER_COUNT ${RENDERER_COUNT}\n")
foreach(renderer ${RENDERERS})
file(APPEND ${RENDERER_C} "extern LG_Renderer LGR_${renderer};\n")
file(APPEND ${RENDERER_C} "extern LG_RendererOps LGR_${renderer};\n")
endforeach()
file(APPEND ${RENDERER_C} "\nconst LG_Renderer * LG_Renderers[] =\n{\n")
file(APPEND ${RENDERER_C} "\nconst LG_RendererOps * LG_Renderers[] =\n{\n")
foreach(renderer ${RENDERERS})
file(APPEND ${RENDERER_C} " &LGR_${renderer},\n")
endforeach()

View file

@ -1064,7 +1064,7 @@ static bool egl_render(void * opaque, LG_RendererRotate rotate, const bool newFr
return true;
}
struct LG_Renderer LGR_EGL =
struct LG_RendererOps LGR_EGL =
{
.get_name = egl_get_name,
.setup = egl_setup,

View file

@ -610,7 +610,7 @@ static void render_wait(struct Inst * this)
glDisable(GL_BLEND);
}
const LG_Renderer LGR_OpenGL =
const LG_RendererOps LGR_OpenGL =
{
.get_name = opengl_get_name,
.setup = opengl_setup,

View file

@ -777,7 +777,7 @@ void intHandler(int sig)
static bool tryRenderer(const int index, const LG_RendererParams lgrParams,
bool * needsOpenGL)
{
const LG_Renderer *r = LG_Renderers[index];
const LG_RendererOps *r = LG_Renderers[index];
if (!IS_LG_RENDERER_VALID(r))
{

View file

@ -89,7 +89,7 @@ struct AppState
bool posInfoValid;
bool alignToGuest;
const LG_Renderer * lgr;
const LG_RendererOps * lgr;
void * lgrData;
atomic_int lgrResize;
LG_Lock lgrLock;