diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-08-13 01:32:56 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-08-13 01:32:56 +0000 |
| commit | c6191a4474b4cab60cc9886860c8b6de7c4e146b (patch) | |
| tree | 7b450e4d69ec922805cf2448af9cc53286f17d73 /plugins/dfxvideo/menu.c | |
| parent | 7d0cd28dd85965b4f94c8eeb5aa2c70297122485 (diff) | |
| download | pcsxr-c6191a4474b4cab60cc9886860c8b6de7c4e146b.tar.gz | |
dfxvideo: Readded windows support.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@56047 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfxvideo/menu.c')
| -rw-r--r-- | plugins/dfxvideo/menu.c | 92 |
1 files changed, 85 insertions, 7 deletions
diff --git a/plugins/dfxvideo/menu.c b/plugins/dfxvideo/menu.c index 33d111d9..57ff2201 100644 --- a/plugins/dfxvideo/menu.c +++ b/plugins/dfxvideo/menu.c @@ -20,19 +20,43 @@ #include "externals.h" #include "draw.h" #include "menu.h" -#include "gpu.h" +#include "gpu.h"
+ +#ifdef _WINDOWS
+
+#include "record.h"
+
+HFONT hGFont=NULL;
+BOOL bTransparent=FALSE;
+
+#endif
unsigned long dwCoreFlags = 0; // create lists/stuff for fonts (actually there are no more lists, but I am too lazy to change the func names ;) void InitMenu(void) -{ +{
+#ifdef _WINDOWS
+ hGFont=CreateFont(//-8,
+ 13,0,0,0,FW_NORMAL,FALSE,FALSE,FALSE,
+ ANSI_CHARSET,OUT_DEFAULT_PRECIS,
+ CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
+ DEFAULT_PITCH,
+ //"Courier New");
+ //"MS Sans Serif");
+ "Arial");
+#endif } // kill existing lists/fonts void CloseMenu(void) { - DestroyPic(); +#ifdef _WINDOWS
+ if(hGFont) DeleteObject(hGFont);
+ hGFont=NULL;
+#else
+ DestroyPic();
+#endif } // DISPLAY FPS/MENU TEXT @@ -43,7 +67,33 @@ extern time_t tStart; int iMPos=0; // menu arrow pos void DisplayText(void) // DISPLAY TEXT -{ +{
+#ifdef _WINDOWS
+ HDC hdc;HFONT hFO;
+
+ IDirectDrawSurface_GetDC(DX.DDSRender,&hdc);
+ hFO=(HFONT)SelectObject(hdc,hGFont);
+
+ SetTextColor(hdc,RGB(0,255,0));
+ if(bTransparent)
+ SetBkMode(hdc,TRANSPARENT);
+ else SetBkColor(hdc,RGB(0,0,0));
+
+ if(szDebugText[0] && ((time(NULL) - tStart) < 2)) // special debug text? show it
+ {
+ RECT r={0,0,1024,1024};
+ DrawText(hdc,szDebugText,lstrlen(szDebugText),&r,DT_LEFT|DT_NOCLIP);
+ }
+ else // else standard gpu menu
+ {
+ szDebugText[0]=0;
+ lstrcat(szDispBuf,szMenuBuf);
+ ExtTextOut(hdc,0,0,0,NULL,szDispBuf,lstrlen(szDispBuf),NULL);
+ }
+
+ SelectObject(hdc,hFO);
+ IDirectDrawSurface_ReleaseDC(DX.DDSRender,hdc);
+#endif } // Build Menu buffer (== Dispbuffer without FPS)... @@ -94,11 +144,28 @@ void BuildDispMenu(int iInc) szMenuBuf[24]='0'+(char)((dwCoreFlags&0xf000)>>12); // number } +#ifdef _WINDOWS
+ if(bVsync_Key) szMenuBuf[25] = 'V';
+#endif
if(lSelectedSlot) szMenuBuf[26] = '0'+(char)lSelectedSlot; - szMenuBuf[(iMPos+1)*5]='<'; // set arrow - + szMenuBuf[(iMPos+1)*5]='<'; // set arrow
+ +#ifdef _WINDOWS
+ if(RECORD_RECORDING)
+ {
+ szMenuBuf[27] = ' ';
+ szMenuBuf[28] = ' ';
+ szMenuBuf[29] = ' ';
+ szMenuBuf[30] = 'R';
+ szMenuBuf[31] = 'e';
+ szMenuBuf[32] = 'c';
+ szMenuBuf[33] = 0;
+ }
+
+ if(DX.DDSScreenPic) ShowTextGpuPic();
+#endif } // Some menu action... @@ -111,7 +178,18 @@ void SwitchDispMenu(int iStep) // SWITCH DISP MENU case 0: // frame limit { int iType=0; - bInitCap = TRUE; + bInitCap = TRUE;
+ +#ifdef _WINDOWS
+ if(iFrameLimit==1 && UseFrameLimit &&
+ GetAsyncKeyState(VK_SHIFT)&32768)
+ {
+ fFrameRate+=iStep;
+ if(fFrameRate<3.0f) fFrameRate=3.0f;
+ SetAutoFrameCap();
+ break;
+ }
+#endif
if(UseFrameLimit) iType=iFrameLimit; iType+=iStep; |
