Merge pull request #1637 from raven02/patch-2

Hide mouse cursor in full screen mode (Windows)
This commit is contained in:
Henrik Rydgård 2013-05-03 00:16:04 -07:00
commit 4df7549a8c
3 changed files with 15 additions and 8 deletions

View File

@ -131,8 +131,8 @@ int PSPMsgDialog::Init(unsigned int paramAddr)
void PSPMsgDialog::DisplayBack()
{
I18NCategory *d = GetI18NCategory("Dialog");
PPGeDrawImage(cancelButtonImg, 290, 220, 20, 20, 0, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(d->T("Back"), 320, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawImage(cancelButtonImg, 290, 220, 12, 12, 0, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(d->T("Back"), 310, 218, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
}
void PSPMsgDialog::DisplayYesNo()
@ -154,8 +154,8 @@ void PSPMsgDialog::DisplayYesNo()
void PSPMsgDialog::DisplayOk()
{
I18NCategory *d = GetI18NCategory("Dialog");
PPGeDrawImage(okButtonImg, 200, 220, 20, 20, 0, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(d->T("Enter"), 230, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
PPGeDrawImage(okButtonImg, 200, 220, 12, 12, 0, CalcFadedColor(0xFFFFFFFF));
PPGeDrawText(d->T("Enter"), 220, 218, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
}
int PSPMsgDialog::Update()

View File

@ -408,8 +408,9 @@ void PauseScreen::render() {
// Shared with settings
I18NCategory *ss = GetI18NCategory("System");
I18NCategory *gs = GetI18NCategory("Graphics");
UICheckBox(GEN_ID, x, y += stride, ss->T("Show Debug Statistics"), ALIGN_TOPLEFT, &g_Config.bShowDebugStats);
I18NCategory *a = GetI18NCategory("Audio");
UICheckBox(GEN_ID, x, y += stride, a->T("Enable Sound"), ALIGN_TOPLEFT, &g_Config.bEnableSound);
UICheckBox(GEN_ID, x, y += stride, ss->T("Show FPS"), ALIGN_TOPLEFT, &g_Config.bShowFPSCounter);
// TODO: Maybe shouldn't show this if the screen ratios are very close...
@ -427,7 +428,7 @@ void PauseScreen::render() {
if (g_Config.iFrameSkip == 0)
g_Config.iFrameSkip = 3;
ui_draw2d.DrawText(UBUNTU24, gs->T("Skip Frames :"), x + 60, y += stride + 10, 0xFFFFFFFF, ALIGN_LEFT);
ui_draw2d.DrawText(UBUNTU24, gs->T("Frames :"), x + 60, y += stride + 10, 0xFFFFFFFF, ALIGN_LEFT);
HLinear hlinear1(x + 250 , y + 5, 20);
if (UIButton(GEN_ID, hlinear1, 80, 0, "Auto", ALIGN_LEFT))
g_Config.iFrameSkip = 3;
@ -702,7 +703,7 @@ void GraphicsScreenP1::render() {
gpu->Resized();
}
if (g_Config.bBufferedRendering) {
if (UICheckBox(GEN_ID, x, y += stride, gs->T("2X", "2x Render Resolution"), ALIGN_TOPLEFT, &g_Config.SSAntiAliasing)) {
if (UICheckBox(GEN_ID, x, y += stride, gs->T("AA", "AntiAliasing"), ALIGN_TOPLEFT, &g_Config.SSAntiAliasing)) {
if (gpu)
gpu->Resized();
}

View File

@ -1084,6 +1084,9 @@ namespace MainWindow
void _ViewNormal(HWND hWnd)
{
ShowCursor(TRUE);
SetCursor(LoadCursor(NULL, IDC_ARROW));
ClipCursor(NULL);
// put caption and border styles back
DWORD dwOldStyle = ::GetWindowLong(hWnd, GWL_STYLE);
DWORD dwNewStyle = dwOldStyle | WS_CAPTION | WS_THICKFRAME;
@ -1107,6 +1110,9 @@ namespace MainWindow
void _ViewFullScreen(HWND hWnd)
{
ShowCursor(FALSE);
SetCursor(NULL);
ClipCursor(&g_normalRC);
// keep in mind normal window rectangle
::GetWindowRect(hWnd, &g_normalRC);