Well, I've had some luck with adding custom resolutions so far. I've updated the text and case switches, and since it's my own personal build I've also removed the 1.5x, 2.5x and 4x internal resolutions (although the 4x could be added with a custom one, as soon as I get it working!). Here's how it looks so far for me...
RenderBase.cpp:
RenderBase.cpp:
VideoConfigDiag.cpp:
Obviously this isn't much progress, although in my defense I'm using it as a learning experience! :D What could I do to have the emulator open a new window with the "Custom Resolution..." window is opened and then have it prompt for a value?
**EDIT
Note to self: Improve commenting formatting in code. It's terrible. LOL
RenderBase.cpp:
Code:
void Renderer::CalculateTargetScale(int x, int y, int &scaledX, int &scaledY)
{
switch (g_ActiveConfig.iEFBScale)
{
case 3: // 2x
scaledX = x * 2;
scaledY = y * 2;
break;
case 4: // 3x
scaledX = x * 3;
scaledY = y * 3;
break;
/*case 5: //Custom Resolution
scaledX = x * customIR;
scaledY = y * customIR;*/
default:
scaledX = x;
scaledY = y;
break;
};
}RenderBase.cpp:
Code:
switch (g_ActiveConfig.iEFBScale)
{
case 0:
res_text = "Auto (fractional)";
break;
case 1:
res_text = "Auto (integral)";
break;
case 2:
res_text = "Native";
break;
case 3:
res_text = "2x";
break;
case 4:
res_text = "3x";
break;
case 5:
res_text = "CUSTOMx";
break;
}VideoConfigDiag.cpp:
Code:
// Internal resolution
{
const wxString efbscale_choices[] = { _("Auto (Window Size)"), _("Auto (Multiple of 640x528)"), wxT("1x Native (640x528)"),
wxT("2x Native (1280x1056)"), wxT("3x Native (1920x1584)"), wxT("Custom Resolution...") };
wxChoice *const choice_efbscale = CreateChoice(page_enh,
vconfig.iEFBScale, wxGetTranslation(internal_res_desc), sizeof(efbscale_choices)/sizeof(*efbscale_choices), efbscale_choices);
szr_enh->Add(new wxStaticText(page_enh, wxID_ANY, _("Internal Resolution:")), 1, wxALIGN_CENTER_VERTICAL, 0);
szr_enh->Add(choice_efbscale);
}Obviously this isn't much progress, although in my defense I'm using it as a learning experience! :D What could I do to have the emulator open a new window with the "Custom Resolution..." window is opened and then have it prompt for a value?
**EDIT
Note to self: Improve commenting formatting in code. It's terrible. LOL
