diff --git a/desmume/src/frontend/modules/osd/agg/agg_osd.cpp b/desmume/src/frontend/modules/osd/agg/agg_osd.cpp index ecaba59d1..b1ac1ba73 100644 --- a/desmume/src/frontend/modules/osd/agg/agg_osd.cpp +++ b/desmume/src/frontend/modules/osd/agg/agg_osd.cpp @@ -561,24 +561,24 @@ static void DrawStateSlots(){ if(alpha!=0) { - aggDraw.hud->lineWidth(1.0); + aggDraw.hud->lineWidth(osd->scale); aggDraw.hud->lineColor(0, 0, 0, alpha); aggDraw.hud->fillColor(255, 255, 255, alpha); - for ( int i = 0, xpos=0; i < 10; xpos=xpos+24) { + for ( int i = 0, xpos=0; i < 10; xpos=xpos+24*osd->scale) { int yheight=0; - aggDraw.hud->fillLinearGradient(xloc + xpos, yloc - yheight, xloc + 22 + xpos, yloc + 20 + yheight+20, agg::rgba8(100,200,255,alpha), agg::rgba8(255,255,255,0)); + aggDraw.hud->fillLinearGradient(xloc + xpos, yloc - yheight, xloc + 22*osd->scale + xpos, yloc + 20*osd->scale + yheight+20*osd->scale, agg::rgba8(100,200,255,alpha), agg::rgba8(255,255,255,0)); if(lastSaveState == i) { - yheight = 5; - aggDraw.hud->fillLinearGradient(xloc + xpos, yloc - yheight, 22 + xloc + xpos, yloc + 20 + yheight+20, agg::rgba8(100,255,255,alpha), agg::rgba8(255,255,255,0)); + yheight = 5*osd->scale; + aggDraw.hud->fillLinearGradient(xloc + xpos, yloc - yheight, 22*osd->scale + xloc + xpos, yloc + 20*osd->scale + yheight+20*osd->scale, agg::rgba8(100,255,255,alpha), agg::rgba8(255,255,255,0)); } - aggDraw.hud->rectangle(xloc + xpos , yloc - yheight, xloc + 22 + xpos , yloc + 20 + yheight); + aggDraw.hud->rectangle(xloc + xpos , yloc - yheight, xloc + 22*osd->scale + xpos , yloc + 20*osd->scale + yheight); snprintf(number, 10, "%d", i); - RenderTextAutoVector(xloc + 1 + xpos + 4, yloc+4, std::string(number), true, osd ? osd->scale : 1); + RenderTextAutoVector(xloc + osd->scale + xpos + 4*osd->scale, yloc+4*osd->scale, std::string(number), true, osd->scale); i++; } } diff --git a/desmume/src/frontend/modules/osd/agg/aggdraw.h b/desmume/src/frontend/modules/osd/agg/aggdraw.h index a3813c670..557b17e5b 100644 --- a/desmume/src/frontend/modules/osd/agg/aggdraw.h +++ b/desmume/src/frontend/modules/osd/agg/aggdraw.h @@ -434,8 +434,9 @@ class AggDrawTarget } #ifdef AGG2D_USE_VECTORFONTS virtual void renderVectorFontText(double dstX, double dstY, const std::string& str) = 0; - virtual void renderVectorFontTextDropshadowed(double dstX, double dstY, const std::string& str, int shadowOffset = 1) + virtual void renderVectorFontTextDropshadowed(double dstX, double dstY, const std::string& str, double shadowOffset = 1.0) { + shadowOffset*=0.5; AggColor lineColorOld = lineColor(); if(lineColorOld.r+lineColorOld.g+lineColorOld.b<192) lineColor(255-lineColorOld.r,255-lineColorOld.g,255-lineColorOld.b); diff --git a/desmume/src/frontend/posix/gtk/main.cpp b/desmume/src/frontend/posix/gtk/main.cpp index 87f1c1ff2..4ad159a68 100644 --- a/desmume/src/frontend/posix/gtk/main.cpp +++ b/desmume/src/frontend/posix/gtk/main.cpp @@ -2124,7 +2124,7 @@ static void GraphicsSettingsDialog(GSimpleAction *action, GVariant *parameter, g #ifdef AGG2D_USE_VECTORFONTS if(vectorFontFile.size() > 0) { - aggDraw.hud->setVectorFont(vectorFontFile, VECTOR_FONT_BASE_SIZE * gpu_scale_factor, true); + aggDraw.hud->setVectorFont(vectorFontFile, std::max(10.0f, VECTOR_FONT_BASE_SIZE * gpu_scale_factor), true); osd->useVectorFonts=true; } else @@ -3096,7 +3096,7 @@ common_gtk_main(GApplication *app, gpointer user_data) #ifdef AGG2D_USE_VECTORFONTS if(vectorFontFile.size() > 0) { - aggDraw.hud->setVectorFont(vectorFontFile, VECTOR_FONT_BASE_SIZE * gpu_scale_factor, true); + aggDraw.hud->setVectorFont(vectorFontFile, std::max(10.0f, VECTOR_FONT_BASE_SIZE * gpu_scale_factor), true); osd->useVectorFonts=true; } else