Exemplo n.º 1
0
void Config_Render(bool force)
{
	int x, y;
	
	if (force) configdirty = 2;
	if (!configdirty) return;
	configdirty--;
	
	ClearFramebuffer();
	DrawText(2, 2, RGB(255, 255, 255), "blargSNES config");
	
	y = 2 + 12 + 10;
	
	DrawCheckBox(10, y, RGB(255,255,255), "Hardware renderer", Config.HardwareRenderer);
	
	y += 26;
	
	DrawText(10, y+1, RGB(255,255,255), "Scaling:");
	x = 10 + MeasureText("Scaling:") + 6;
	
	char* scalemodes[] = {"1:1", "Fullscreen", "Cropped", "4:3", "Cropped 4:3"};
	int themode = Config.ScaleMode;
	if (themode < 0 || themode > 4) themode = 0;
	DrawButton(x, y-3, 140, RGB(255,255,255), scalemodes[themode]);
	
	
	DrawButton(10, 212, 0, RGB(255,128,128), "Cancel");
	DrawButton(-10, 212, 0, RGB(128,255,128), "Save changes");
}
Exemplo n.º 2
0
// ----------------------------------------------------------------------------
BitmapWidget::BitmapWidget(wxWindow *parent, int width, int height)
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS),
  m_filterEnable(false), m_filterType(0), m_scalingType(0)
{
    m_width  = width;
    m_height = height;
    m_aspect = (float)m_width / m_height;

    m_bmp = new wxBitmap(m_width, m_height, 24);
    ClearFramebuffer(0);

    SetBackgroundStyle(wxBG_STYLE_CUSTOM);
    SetBackgroundColour(wxColour(0, 0, 0));

    Bind(wxEVT_SIZE,  &BitmapWidget::OnSize,  this);
    Bind(wxEVT_PAINT, &BitmapWidget::OnPaint, this);

    // log_info("Software renderer successfully initialized\n");
}