mirror of https://github.com/mgba-emu/mgba.git
SDL: Add integer scaling
This commit is contained in:
parent
b58d216868
commit
3889fd4d3f
|
@ -38,6 +38,7 @@ bool mSDLGLInit(struct mSDLRenderer* renderer) {
|
||||||
mGLContextCreate(&renderer->gl);
|
mGLContextCreate(&renderer->gl);
|
||||||
renderer->gl.d.user = renderer;
|
renderer->gl.d.user = renderer;
|
||||||
renderer->gl.d.lockAspectRatio = renderer->lockAspectRatio;
|
renderer->gl.d.lockAspectRatio = renderer->lockAspectRatio;
|
||||||
|
renderer->gl.d.lockIntegerScaling = renderer->lockIntegerScaling;
|
||||||
renderer->gl.d.filter = renderer->filter;
|
renderer->gl.d.filter = renderer->filter;
|
||||||
renderer->gl.d.swap = mSDLGLCommonSwap;
|
renderer->gl.d.swap = mSDLGLCommonSwap;
|
||||||
renderer->gl.d.init(&renderer->gl.d, 0);
|
renderer->gl.d.init(&renderer->gl.d, 0);
|
||||||
|
|
|
@ -109,6 +109,7 @@ bool mSDLGLES2Init(struct mSDLRenderer* renderer) {
|
||||||
mGLES2ContextCreate(&renderer->gl2);
|
mGLES2ContextCreate(&renderer->gl2);
|
||||||
renderer->gl2.d.user = renderer;
|
renderer->gl2.d.user = renderer;
|
||||||
renderer->gl2.d.lockAspectRatio = renderer->lockAspectRatio;
|
renderer->gl2.d.lockAspectRatio = renderer->lockAspectRatio;
|
||||||
|
renderer->gl2.d.lockIntegerScaling = renderer->lockIntegerScaling;
|
||||||
renderer->gl2.d.filter = renderer->filter;
|
renderer->gl2.d.filter = renderer->filter;
|
||||||
renderer->gl2.d.swap = mSDLGLCommonSwap;
|
renderer->gl2.d.swap = mSDLGLCommonSwap;
|
||||||
renderer->gl2.d.init(&renderer->gl2.d, 0);
|
renderer->gl2.d.init(&renderer->gl2.d, 0);
|
||||||
|
|
|
@ -114,6 +114,7 @@ int main(int argc, char** argv) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
renderer.lockAspectRatio = renderer.core->opts.lockAspectRatio;
|
renderer.lockAspectRatio = renderer.core->opts.lockAspectRatio;
|
||||||
|
renderer.lockIntegerScaling = renderer.core->opts.lockIntegerScaling;
|
||||||
renderer.filter = renderer.core->opts.resampleVideo;
|
renderer.filter = renderer.core->opts.resampleVideo;
|
||||||
|
|
||||||
if (!mSDLInit(&renderer)) {
|
if (!mSDLInit(&renderer)) {
|
||||||
|
|
|
@ -65,6 +65,7 @@ struct mSDLRenderer {
|
||||||
int ratio;
|
int ratio;
|
||||||
|
|
||||||
bool lockAspectRatio;
|
bool lockAspectRatio;
|
||||||
|
bool lockIntegerScaling;
|
||||||
bool filter;
|
bool filter;
|
||||||
|
|
||||||
#ifdef BUILD_GL
|
#ifdef BUILD_GL
|
||||||
|
|
Loading…
Reference in New Issue