diff --git a/mkxp.conf.sample b/mkxp.conf.sample index 7323fcb..99caf90 100644 --- a/mkxp.conf.sample +++ b/mkxp.conf.sample @@ -95,6 +95,13 @@ # subImageFix=false +# Enable framebuffer blitting if the driver is +# capable of it. Some drivers carry buggy +# implementations of this functionality, so +# disabling it can be used as a workaround +# (default: enabled) +# +# enableBlitting=true # Set the base path of the game to '/path/to/game' # (default: executable directory) # diff --git a/src/config.cpp b/src/config.cpp index 56e2386..edb89bc 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -388,6 +388,7 @@ void Config::read(int argc, char *argv[]) PO_DESC(frameSkip, bool) \ PO_DESC(solidFonts, bool) \ PO_DESC(subImageFix, bool) \ + PO_DESC(enableBlitting, bool) \ PO_DESC(gameFolder, std::string) \ PO_DESC(anyAltToggleFS, bool) \ PO_DESC(enableReset, bool) \ diff --git a/src/config.h b/src/config.h index e3c8b32..5ae5f3b 100644 --- a/src/config.h +++ b/src/config.h @@ -46,6 +46,7 @@ struct Config bool solidFonts; bool subImageFix; + bool enableBlitting; std::string gameFolder; bool anyAltToggleFS; diff --git a/src/main.cpp b/src/main.cpp index c6f1f91..a98fa51 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -99,6 +99,9 @@ int rgssThreadFun(void *userdata) return 0; } + if (!threadData->config.enableBlitting) + gl.BlitFramebuffer = 0; + gl.ClearColor(0, 0, 0, 1); gl.Clear(GL_COLOR_BUFFER_BIT); SDL_GL_SwapWindow(win);