all repos — mgba @ 75557d11b2c2ca18fe5f50f4a62e9275ad71f41c

mGBA Game Boy Advance Emulator

GBA: const-correctness in GBAMap*ToContext
Jeffrey Pfau jeffrey@endrift.com
Tue, 04 Nov 2014 01:56:59 -0800
commit

75557d11b2c2ca18fe5f50f4a62e9275ad71f41c

parent

4115b240eb4e7da4975797f87be29f2badfc5389

2 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/gba/gba-thread.csrc/gba/gba-thread.c

@@ -220,7 +220,7 @@

return 0; } -void GBAMapOptionsToContext(struct GBAOptions* opts, struct GBAThread* threadContext) { +void GBAMapOptionsToContext(const struct GBAOptions* opts, struct GBAThread* threadContext) { threadContext->bios = VFileOpen(opts->bios, O_RDONLY); threadContext->frameskip = opts->frameskip; threadContext->logLevel = opts->logLevel;

@@ -238,7 +238,7 @@ threadContext->audioBuffers = opts->audioBuffers;

} } -void GBAMapArgumentsToContext(struct GBAArguments* args, struct GBAThread* threadContext) { +void GBAMapArgumentsToContext(const struct GBAArguments* args, struct GBAThread* threadContext) { if (args->dirmode) { threadContext->gameDir = VDirOpen(args->fname); threadContext->stateDir = threadContext->gameDir;
M src/gba/gba-thread.hsrc/gba/gba-thread.h

@@ -95,8 +95,8 @@ struct GBASerializedState** rewindBuffer;

int rewindBufferWriteOffset; }; -void GBAMapOptionsToContext(struct GBAOptions*, struct GBAThread*); -void GBAMapArgumentsToContext(struct GBAArguments*, struct GBAThread*); +void GBAMapOptionsToContext(const struct GBAOptions*, struct GBAThread*); +void GBAMapArgumentsToContext(const struct GBAArguments*, struct GBAThread*); bool GBAThreadStart(struct GBAThread* threadContext); bool GBAThreadHasStarted(struct GBAThread* threadContext);