mirror of https://github.com/mgba-emu/mgba.git
Core: Const-correctness
This commit is contained in:
parent
a903fe19d8
commit
3c73afb7a9
|
@ -70,7 +70,7 @@ struct mCore {
|
|||
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);
|
||||
|
||||
|
|
|
@ -277,8 +277,8 @@ static void _GBCoreReloadConfigOption(struct mCore* core, const char* option, co
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
|
@ -388,9 +388,9 @@ static void _GBACoreReloadConfigOption(struct mCore* core, const char* option, c
|
|||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue