Core: Const-correctness
Vicki Pfau vi@endrift.com
Thu, 25 Jun 2020 18:10:55 -0700
3 files changed,
5 insertions(+),
5 deletions(-)
M
include/mgba/core/core.h
→
include/mgba/core/core.h
@@ -70,7 +70,7 @@ void (*setSync)(struct mCore*, struct mCoreSync*);
void (*loadConfig)(struct mCore*, const struct mCoreConfig*); void (*reloadConfigOption)(struct mCore*, const char* option, const struct mCoreConfig*); - void (*desiredVideoDimensions)(struct mCore*, unsigned* width, unsigned* height); + void (*desiredVideoDimensions)(const struct mCore*, unsigned* width, unsigned* height); void (*setVideoBuffer)(struct mCore*, color_t* buffer, size_t stride); void (*setVideoGLTex)(struct mCore*, unsigned texid);
M
src/gb/core.c
→
src/gb/core.c
@@ -277,8 +277,8 @@ return;
} } -static void _GBCoreDesiredVideoDimensions(struct mCore* core, unsigned* width, unsigned* height) { - struct GB* gb = core->board; +static void _GBCoreDesiredVideoDimensions(const struct mCore* core, unsigned* width, unsigned* height) { + const struct GB* gb = core->board; if (gb && (!(gb->model & GB_MODEL_SGB) || !gb->video.sgbBorders)) { *width = GB_VIDEO_HORIZONTAL_PIXELS; *height = GB_VIDEO_VERTICAL_PIXELS;
M
src/gba/core.c
→
src/gba/core.c
@@ -388,9 +388,9 @@ }
} } -static void _GBACoreDesiredVideoDimensions(struct mCore* core, unsigned* width, unsigned* height) { +static void _GBACoreDesiredVideoDimensions(const struct mCore* core, unsigned* width, unsigned* height) { #if defined(BUILD_GLES2) || defined(BUILD_GLES3) - struct GBACore* gbacore = (struct GBACore*) core; + const struct GBACore* gbacore = (const struct GBACore*) core; int scale = gbacore->glRenderer.scale; #else UNUSED(core);