peopsxgl: Readded windows support.

git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@56180 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
SND\weimingzhi_cp 2010-08-18 01:34:01 +00:00
parent c4a77870fc
commit c4f5208806
41 changed files with 4750 additions and 96 deletions

View File

@ -1,3 +1,47 @@
August 18, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
* plugins/peopsxgl/cfg.h: Readded Windows support.
* plugins/peopsxgl/draw.c: Likewise.
* plugins/peopsxgl/draw.h: Likewise.
* plugins/peopsxgl/externals.h: Likewise.
* plugins/peopsxgl/fps.h: Likewise.
* plugins/peopsxgl/gl_ext.h: Likewise.
* plugins/peopsxgl/gpu.c: Likewise.
* plugins/peopsxgl/menu.c: Likewise.
* plugins/peopsxgl/menu.h: Likewise.
* plugins/peopsxgl/soft.c: Likewise.
* plugins/peopsxgl/stdafx.h: Likewise.
* plugins/peopsxgl/texture.c: Likewise.
* win32/plugins/peopsxgl: Added.
* win32/plugins/dfsound/winsrc/bitmap1.bmp: Moved to...
* win32/plugins/dfsound/bitmap1.bmp: Here.
* win32/plugins/dfsound/winsrc/bitmap2.bmp: Moved to...
* win32/plugins/dfsound/bitmap2.bmp: Here.
* win32/plugins/dfsound/winsrc/bitmap3.bmp: Moved to...
* win32/plugins/dfsound/bitmap3.bmp: Here.
* win32/plugins/dfsound/winsrc/bitmap4.bmp: Moved to...
* win32/plugins/dfsound/bitmap4.bmp: Here.
* win32/plugins/dfsound/winsrc/bitmap5.bmp: Moved to...
* win32/plugins/dfsound/bitmap5.bmp: Here.
* win32/plugins/dfsound/winsrc/DFSound.def: Moved to...
* win32/plugins/dfsound/DFSound.def: Here.
* win32/plugins/dfsound/winsrc/DFSound.rc: Moved to...
* win32/plugins/dfsound/DFSound.rc: Here.
* win32/plugins/dfsound/winsrc/resource.h: Moved to...
* win32/plugins/dfsound/resource.h: Here.
* win32/plugins/dfsound/DFSound.dsp: Updated.
* win32/plugins/dfsound/DFSound.dev: Added Dev-C++ Project file.
* win32/plugins/dfxvideo/winsrc/DFXVideo.def: Moved to...
* win32/plugins/dfxvideo/DFXVideo.def: Here.
* win32/plugins/dfxvideo/winsrc/DFXVideo.rc: Moved to...
* win32/plugins/dfxvideo/DFXVideo.rc: Here.
* win32/plugins/dfxvideo/winsrc/gpu.bmp: Moved to...
* win32/plugins/dfxvideo/gpu.bmp: Here.
* win32/plugins/dfxvideo/winsrc/resource.h: Moved to...
* win32/plugins/dfxvideo/resource.h: Here.
* win32/plugins/dfxvideo/DFXVideo.dsp: Updated.
* win32/plugins/dfxvideo/DFXVideo.dev: Added Dev-C++ Project file.
August 14, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
* plugins/dfxvideo/draw.c: Fixed hq2x/hq3x under Windows.

View File

@ -16,5 +16,17 @@
* *
***************************************************************************/
#ifdef _WINDOWS
void ReadConfig(void);
void ReadConfigFile();
void WriteConfig(void);
void ReadWinSizeConfig(void);
BOOL CALLBACK CfgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam);
#else
void ReadConfig(void);
void ReadConfigFile();
#endif

View File

@ -76,22 +76,27 @@
////////////////////////////////////////////////////////////////////////////////////
// draw globals; most will be initialized again later (by config or checks)
BOOL bIsFirstFrame=TRUE;
#ifdef _WINDOWS
HDC dcGlobal = NULL;
HWND hWWindow;
#endif
BOOL bIsFirstFrame = TRUE;
// resolution/ratio vars
int iResX;
int iResY;
BOOL bKeepRatio=FALSE;
BOOL bKeepRatio = FALSE;
RECT rRatioRect;
// psx mask related vars
BOOL bCheckMask=FALSE;
int iUseMask=0;
int iSetMask=0;
unsigned short sSetMask=0;
uint32_t lSetMask=0;
BOOL bCheckMask = FALSE;
int iUseMask = 0;
int iSetMask = 0;
unsigned short sSetMask = 0;
uint32_t lSetMask = 0;
// drawing/coord vars
@ -129,6 +134,55 @@ int iDepthFunc=0;
int iZBufferDepth=0;
GLbitfield uiBufferBits=GL_COLOR_BUFFER_BIT;
////////////////////////////////////////////////////////////////////////
// Set OGL pixel format
////////////////////////////////////////////////////////////////////////
#ifdef _WINDOWS
BOOL bSetupPixelFormat(HDC hDC)
{
int pixelformat;
static PIXELFORMATDESCRIPTOR pfd =
{
sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd
1, // version number
PFD_DRAW_TO_WINDOW | // support window
PFD_SUPPORT_OPENGL | // support OpenGL
PFD_DOUBLEBUFFER, // double buffered
PFD_TYPE_RGBA, // RGBA type
16, // 16-bit color depth (adjusted later)
0, 0, 0, 0, 0, 0, // color bits ignored
0, // no alpha buffer
0, // shift bit ignored
0, // no accumulation buffer
0, 0, 0, 0, // accum bits ignored
0, // z-buffer
0,
0, // no auxiliary buffer
PFD_MAIN_PLANE, // main layer
0, // reserved
0, 0, 0 // layer masks ignored
};
pfd.cColorBits=iColDepth; // set user color depth
pfd.cDepthBits=iZBufferDepth; // set user zbuffer (by psx mask)
if((pixelformat=ChoosePixelFormat(hDC,&pfd))==0)
{
MessageBox(NULL,"ChoosePixelFormat failed","Error",MB_OK);
return FALSE;
}
if(SetPixelFormat(hDC,pixelformat, &pfd)==FALSE)
{
MessageBox(NULL,"SetPixelFormat failed","Error",MB_OK);
return FALSE;
}
return TRUE;
}
#endif
////////////////////////////////////////////////////////////////////////
// Get extension infos (f.e. pal textures / packed pixels)
////////////////////////////////////////////////////////////////////////
@ -170,7 +224,11 @@ void GetExtInfos(void)
{
iUsePalTextures=1; // -> wow, supported, get func pointer
#ifdef _WINDOWS
glColorTableEXTEx=(PFNGLCOLORTABLEEXT)wglGetProcAddress("glColorTableEXT");
#else
glColorTableEXTEx=(PFNGLCOLORTABLEEXT)glXGetProcAddress("glColorTableEXT");
#endif
if(glColorTableEXTEx==NULL) iUsePalTextures=0; // -> ha, cheater... no func, no support
}
@ -192,11 +250,27 @@ void SetExtGLFuncs(void)
//----------------------------------------------------//
#ifdef _WINDOWS
if((iForceVSync>=0) && // force vsync?
strstr((char *)glGetString(GL_EXTENSIONS), // and extension available?
"WGL_EXT_swap_control"))
{
PFNWGLSWAPINTERVALFARPROC wglSwapIntervalEXT=
(PFNWGLSWAPINTERVALFARPROC)wglGetProcAddress("wglSwapIntervalEXT");
if(wglSwapIntervalEXT) wglSwapIntervalEXT(iForceVSync);
}
#endif
if(iUseExts && !(dwActFixes&1024) && // extensions wanted? and not turned off by game fix?
strstr((char *)glGetString(GL_EXTENSIONS), // and blend_subtract available?
"GL_EXT_blend_subtract"))
{ // -> get ogl blend function pointer
glBlendEquationEXTEx=(PFNGLBLENDEQU)glXGetProcAddress("glBlendEquationEXT");
#ifdef _WINDOWS
glBlendEquationEXTEx=(PFNGLBLENDEQU)wglGetProcAddress("glBlendEquationEXT");
#else
glBlendEquationEXTEx=(PFNGLBLENDEQU)glXGetProcAddress("glBlendEquationEXT");
#endif
}
else // no subtract blending?
{
@ -446,8 +520,23 @@ void CreateScanLines(void)
// Initialize OGL
////////////////////////////////////////////////////////////////////////
#ifdef _WINDOWS
HGLRC GLCONTEXT=NULL;
#endif
int GLinitialize()
{
#ifdef _WINDOWS
HGLRC objectRC;
// init
dcGlobal = GetDC(hWWindow); // FIRST: dc/rc stuff
objectRC = wglCreateContext(dcGlobal);
GLCONTEXT=objectRC;
wglMakeCurrent(dcGlobal, objectRC);
// CheckWGLExtensions(dcGlobal);
if(bWindowMode) ReleaseDC(hWWindow,dcGlobal); // win mode: release dc again
#endif
glViewport(rRatioRect.left, // init viewport by ratio rect
iResY-(rRatioRect.top+rRatioRect.bottom),
rRatioRect.right,
@ -545,10 +634,13 @@ int GLinitialize()
glPixelTransferi(GL_ALPHA_SCALE, 1);
glPixelTransferi(GL_ALPHA_BIAS, 0);
printf(glGetString(GL_VENDOR)); // linux: tell user what is getting used
printf("\n");
printf(glGetString(GL_RENDERER));
printf("\n");
#ifdef _WINDOWS
// detect Windows hw/sw mode (just for info)
if(!strcmp("Microsoft Corporation",(LPTSTR)glGetString(GL_VENDOR)) &&
!strcmp("GDI Generic", (LPTSTR)glGetString(GL_RENDERER)))
bGLSoft=TRUE;
else bGLSoft=FALSE;
#endif
glFlush(); // we are done...
glFinish();
@ -591,6 +683,13 @@ void GLcleanup()
}
CleanupTextureStore(); // bye textures
#ifdef _WINDOWS
wglMakeCurrent(NULL, NULL); // bye context
if(GLCONTEXT) wglDeleteContext(GLCONTEXT);
if(!bWindowMode && dcGlobal)
ReleaseDC(hWWindow,dcGlobal);
#endif
}
////////////////////////////////////////////////////////////////////////
@ -1378,7 +1477,9 @@ void assignTexture4(void)
// render pos / buffers
////////////////////////////////////////////////////////////////////////
#ifndef _WINDOWS
#define EqualRect(pr1,pr2) ((pr1)->left==(pr2)->left && (pr1)->top==(pr2)->top && (pr1)->right==(pr2)->right && (pr1)->bottom==(pr2)->bottom)
#endif
////////////////////////////////////////////////////////////////////////
// SetDisplaySettings: "simply" calcs the new drawing area and updates

View File

@ -28,6 +28,11 @@
#define COLOR(x) (x & 0xffffff)
// prototypes
#ifdef _WINDOWS
BOOL bSetupPixelFormat(HDC hDC);
#endif
int GLinitialize();
void GLcleanup();
BOOL offset2(void);

View File

@ -78,6 +78,8 @@
#define KEY_STEPDOWN 256
#define KEY_TOGGLEFBREAD 512
#ifndef _WINDOWS
#define FALSE 0
#define TRUE 1
#define BOOL unsigned short
@ -96,6 +98,8 @@ typedef struct RECTTAG
int bottom;
}RECT;
#endif
typedef struct VRAMLOADTAG
{
short x;
@ -194,6 +198,12 @@ extern char *pConfigFile;
#endif
#ifdef _WINDOWS
extern HINSTANCE hInst;
#endif
#ifndef _IN_DRAW
extern int iResX;
@ -219,6 +229,9 @@ extern unsigned char gl_ux[8];
extern unsigned char gl_vy[8];
extern OGLVertex vertex[4];
extern short sprtY,sprtX,sprtH,sprtW;
#ifdef _WINDOWS
extern HWND hWWindow;
#endif
extern BOOL bIsFirstFrame;
extern int iWinSize;
extern int iZBufferDepth;

View File

@ -25,4 +25,6 @@ void CheckFrameRate(void);
void ReInitFrameCap(void);
void SetAutoFrameCap(void);
#ifndef _WINDOWS
unsigned long timeGetTime();
#endif

View File

@ -1,4 +1,4 @@
#define COMBINE_EXT 0x8570
#define COMBINE_EXT 0x8570
#define COMBINE_RGB_EXT 0x8571
#define COMBINE_ALPHA_EXT 0x8572
#define SOURCE0_RGB_EXT 0x8580
@ -22,16 +22,35 @@
#define FUNC_ADD_EXT 0x8006
#define FUNC_REVERSESUBTRACT_EXT 0x800B
typedef void (* PFNGLBLENDEQU) (GLenum mode);
typedef void (* PFNGLCOLORTABLEEXT)
(GLenum target, GLenum internalFormat, GLsizei width, GLenum format,
GLenum type, const GLvoid *data);
#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
//GL_ALPHA_SCALE
#ifdef _WINDOWS
typedef void (APIENTRY * PFNGLBLENDEQU) (GLenum mode);
typedef void (APIENTRY * PFNGLCOLORTABLEEXT)
(GLenum target, GLenum internalFormat, GLsizei width, GLenum format,
GLenum type, const GLvoid *data);
typedef BOOL (APIENTRY *PFNWGLSWAPINTERVALFARPROC)(int iV);
#else
typedef void (* PFNGLBLENDEQU) (GLenum mode);
typedef void (* PFNGLCOLORTABLEEXT)
(GLenum target, GLenum internalFormat, GLsizei width, GLenum format,
GLenum type, const GLvoid *data);
#endif
#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
#ifndef GL_BGR_EXT
#define GL_BGR_EXT 0x80E0
#endif
#ifndef GL_BGRA_EXT
#define GL_BGRA_EXT 0x80E1
#endif
#ifndef GL_COLOR_INDEX8_EXT
#define GL_COLOR_INDEX8_EXT 0x80E5
#endif
//GL_ALPHA_SCALE

View File

@ -20,6 +20,9 @@
//#define NOVMODE
#include "stdafx.h"
#ifndef _WINDOWS
#include "config.h"
#ifndef NOVMODE
@ -28,6 +31,8 @@ static XF86VidModeModeInfo **modes=0;
static int iOldMode=0;
#endif
#endif
#define _IN_GPU
#include "externals.h"
@ -40,6 +45,10 @@ static int iOldMode=0;
#include "menu.h"
#include "fps.h"
#include "key.h"
#ifdef _WINDOWS
#include "resource.h"
#include "ssave.h"
#endif
#ifdef ENABLE_NLS
#include <libintl.h>
#include <locale.h>
@ -49,7 +58,7 @@ static int iOldMode=0;
#define _(x) (x)
#define N_(x) (x)
#endif
////////////////////////////////////////////////////////////////////////
// PPDK developer must change libraryName field and can change revision and build
////////////////////////////////////////////////////////////////////////
@ -84,6 +93,10 @@ BOOL bNeedInterlaceUpdate=FALSE;
BOOL bNeedRGB24Update=FALSE;
BOOL bChangeWinMode=FALSE;
#ifdef _WINDOWS
extern HGLRC GLCONTEXT;
#endif
uint32_t ulStatusControl[256];
////////////////////////////////////////////////////////////////////////
@ -168,8 +181,15 @@ char * GPUgetLibInfos(void)
// snapshot funcs (saves screen to bitmap / text infos into file)
////////////////////////////////////////////////////////////////////////
#ifdef _WINDOWS
char * GetConfigInfos(HWND hW)
#else
char * GetConfigInfos(int hW)
#endif
{
#ifdef _WINDOWS
HDC hdc;HGLRC hglrc;
#endif
char szO[2][4]={"off","on "};
char szTxt[256];
char * pB=(char *)malloc(32767);
@ -177,11 +197,21 @@ char * GetConfigInfos(int hW)
if(!pB) return NULL;
*pB=0;
//----------------------------------------------------//
sprintf(szTxt,"Plugin: %s %d.%d.%d\r\n",libraryName,version,revision,build);
sprintf(szTxt,"Plugin: %s %d.%d.%d (mod)\r\n",libraryName,version,revision,build);
strcat(pB,szTxt);
sprintf(szTxt,"Author: %s\r\n",PluginAuthor);
strcat(pB,szTxt);
#ifdef _WINDOWS
if(hW)
{
hdc = GetDC(hW);
bSetupPixelFormat(hdc);
hglrc = wglCreateContext(hdc);
wglMakeCurrent(hdc, hglrc);
}
#endif
sprintf(szTxt,"Card vendor: %s\r\n",(char *)glGetString(GL_VENDOR));
strcat(pB,szTxt);
sprintf(szTxt,"GFX card: %s\r\n",(char *)glGetString(GL_RENDERER));
@ -191,6 +221,16 @@ char * GetConfigInfos(int hW)
//strcat(pB,(char *)glGetString(GL_EXTENSIONS));
//strcat(pB,"\r\n\r\n");
#ifdef _WINDOWS
if(hW)
{
wglMakeCurrent(NULL, NULL);
wglDeleteContext(hglrc);
ReleaseDC(hW,hdc);
}
//----------------------------------------------------//
#endif
if(hW && bWindowMode)
sprintf(szTxt,"Resolution/Color:\r\n- %dx%d ",LOWORD(iWinSize),HIWORD(iWinSize));
else
@ -328,7 +368,11 @@ void DoTextSnapShot(int iNum)
{
FILE *txtfile;char szTxt[256];char * pB;
#ifdef _WINDOWS
sprintf(szTxt,"snap\\pcsx%04d.txt",iNum);
#else
sprintf(szTxt,"%s/pcsx%04d.txt",getenv("HOME"),iNum);
#endif
if((txtfile=fopen(szTxt,"wb"))==NULL)
return;
@ -393,7 +437,11 @@ void DoSnapShot(void)
do
{
snapshotnr++;
#ifdef _WINDOWS
sprintf(filename,"snap/pcsx%04d.bmp",snapshotnr);
#else
sprintf(filename,"%s/pcsx%04d.bmp",getenv("HOME"),snapshotnr);
#endif
bmpfile=fopen(filename,"rb");
if(bmpfile==NULL)break;
fclose(bmpfile);
@ -421,6 +469,9 @@ void DoSnapShot(void)
free(snapshotdumpmem);
DoTextSnapShot(snapshotnr);
#ifdef _WINDOWS
MessageBeep((UINT)-1);
#endif
}
void CALLBACK GPUmakeSnapshot(void)
@ -509,6 +560,140 @@ long CALLBACK GPUinit()
// GPU OPEN: funcs to open up the gpu display (Windows)
////////////////////////////////////////////////////////////////////////
#ifdef _WINDOWS
void ChangeDesktop() // change destop resolution
{
DEVMODE dv;long lRes,iTry=0;
while(iTry<10) // keep on hammering...
{
memset(&dv,0,sizeof(DEVMODE));
dv.dmSize=sizeof(DEVMODE);
dv.dmBitsPerPel=iColDepth;
dv.dmPelsWidth=iResX;
dv.dmPelsHeight=iResY;
dv.dmFields=DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT;
lRes=ChangeDisplaySettings(&dv,0); // ...hammering the anvil
if(lRes==DISP_CHANGE_SUCCESSFUL) return;
iTry++;Sleep(10);
}
}
////////////////////////////////////////////////////////////////////////
// OPEN interface func: attention!
// some emus are calling this func in their main Window thread,
// but all other interface funcs (to draw stuff) in a different thread!
// that's a problem, since OGL is thread safe! Therefore we cannot
// initialize the OGL stuff right here, we simply set a "bIsFirstFrame = TRUE"
// flag, to initialize OGL on the first real draw call.
// btw, we also call this open func ourselfes, each time when the user
// is changing between fullscreen/window mode (ENTER key)
// btw part 2: in windows the plugin gets the window handle from the
// main emu, and doesn't create it's own window (if it would do it,
// some PAD or SPU plugins would not work anymore)
////////////////////////////////////////////////////////////////////////
HMENU hPSEMenu=NULL;
long CALLBACK GPUopen(HWND hwndGPU)
{
HDC hdc;RECT r;DEVMODE dv;
hWWindow = hwndGPU; // store hwnd globally
InitKeyHandler(); // init key handler (subclass window)
if(bChangeWinMode) // user wants to change fullscreen/window mode?
{
ReadWinSizeConfig(); // -> get sizes again
}
else // first real startup
{
ReadConfig(); // -> read config from registry
SetFrameRateConfig(); // -> setup frame rate stuff
}
if(iNoScreenSaver) EnableScreenSaver(FALSE); // at least we can try
memset(&dv,0,sizeof(DEVMODE));
dv.dmSize=sizeof(DEVMODE);
EnumDisplaySettings(NULL,ENUM_CURRENT_SETTINGS,&dv);
bIsFirstFrame = TRUE; // flag: we have to init OGL later in windows!
if(bWindowMode) // win mode?
{
DWORD dw=GetWindowLong(hWWindow, GWL_STYLE); // -> adjust wnd style (owndc needed by some stupid ogl drivers)
dw&=~WS_THICKFRAME;
dw|=WS_BORDER|WS_CAPTION|CS_OWNDC;
SetWindowLong(hWWindow, GWL_STYLE, dw);
hPSEMenu=GetMenu(hWWindow); // -> hide emu menu (if any)
if(hPSEMenu!=NULL) SetMenu(hWWindow,NULL);
iResX=LOWORD(iWinSize);iResY=HIWORD(iWinSize);
ShowWindow(hWWindow,SW_SHOWNORMAL);
MoveWindow(hWWindow, // -> center wnd
GetSystemMetrics(SM_CXFULLSCREEN)/2-iResX/2,
GetSystemMetrics(SM_CYFULLSCREEN)/2-iResY/2,
iResX+GetSystemMetrics(SM_CXFIXEDFRAME)+3,
iResY+GetSystemMetrics(SM_CYFIXEDFRAME)+GetSystemMetrics(SM_CYCAPTION)+3,
TRUE);
UpdateWindow(hWWindow); // -> let windows do some update
if(dv.dmBitsPerPel==16 || dv.dmBitsPerPel==32) // -> overwrite user color info with desktop color info
iColDepth=dv.dmBitsPerPel;
}
else // fullscreen mode:
{
if(dv.dmBitsPerPel!=(unsigned int)iColDepth || // -> check, if we have to change resolution
dv.dmPelsWidth !=(unsigned int)iResX ||
dv.dmPelsHeight!=(unsigned int)iResY)
bChangeRes=TRUE; else bChangeRes=FALSE;
if(bChangeRes) ChangeDesktop(); // -> change the res (had to do an own func because of some MS 'optimizations')
SetWindowLong(hWWindow, GWL_STYLE, CS_OWNDC); // -> adjust wnd style as well (to be sure)
hPSEMenu=GetMenu(hWWindow); // -> hide menu
if(hPSEMenu!=NULL) SetMenu(hWWindow,NULL);
ShowWindow(hWWindow,SW_SHOWMAXIMIZED); // -> max mode
}
rRatioRect.left = rRatioRect.top=0;
rRatioRect.right = iResX;
rRatioRect.bottom = iResY;
r.left=r.top=0;r.right=iResX;r.bottom=iResY; // hack for getting a clean black window until OGL gets initialized
hdc = GetDC(hWWindow);
FillRect(hdc,&r,(HBRUSH)GetStockObject(BLACK_BRUSH));
bSetupPixelFormat(hdc);
ReleaseDC(hWWindow,hdc);
bDisplayNotSet = TRUE;
bSetClip=TRUE;
SetFixes(); // setup game fixes
InitializeTextureStore(); // init texture mem
// lGPUstatusRet = 0x74000000;
// with some emus, we could do the OGL init right here... oh my
// if(bIsFirstFrame) GLinitialize();
return 0;
}
#else
////////////////////////////////////////////////////////////////////////
// LINUX GPU OPEN: func to open up the gpu display (X stuff)
// please note: in linux we are creating our own display, and we return
@ -844,10 +1029,36 @@ long GPUopen(unsigned long * disp,char * CapText,char * CfgFile)
return -1;
}
#endif
////////////////////////////////////////////////////////////////////////
// close
////////////////////////////////////////////////////////////////////////
#ifdef _WINDOWS
long CALLBACK GPUclose() // WINDOWS CLOSE
{
ExitKeyHandler();
GLcleanup(); // close OGL
if(bChangeRes) // change res back
ChangeDisplaySettings(NULL,0);
if(hPSEMenu) // set menu again
SetMenu(hWWindow,hPSEMenu);
if(pGfxCardScreen) free(pGfxCardScreen); // free helper memory
pGfxCardScreen=0;
if(iNoScreenSaver) EnableScreenSaver(TRUE); // enable screen saver again
return 0;
}
#else
long GPUclose() // LINUX CLOSE
{
GLcleanup(); // close OGL
@ -860,6 +1071,8 @@ long GPUclose() // LINUX CLOSE
return 0;
}
#endif
////////////////////////////////////////////////////////////////////////
// I shot the sheriff... last function called from emu
////////////////////////////////////////////////////////////////////////
@ -1180,6 +1393,11 @@ void updateDisplay(void) // UPDATE DISPLAY
{
BOOL bBlur=FALSE;
#ifdef _WINDOWS
HDC hdc=GetDC(hWWindow); // windows:
wglMakeCurrent(hdc,GLCONTEXT); // -> make context current again
#endif
bFakeFrontBuffer=FALSE;
bRenderFrontBuffer=FALSE;
@ -1267,7 +1485,11 @@ void updateDisplay(void) // UPDATE DISPLAY
if(!bSkipNextFrame)
{
if(iDrawnSomething)
#ifdef _WINDOWS
SwapBuffers(wglGetCurrentDC()); // -> to skip or not to skip
#else
glXSwapBuffers(display,window);
#endif
}
if(dwActFixes&0x180) // -> special old frame skipping: skip max one in a row
{
@ -1280,7 +1502,11 @@ void updateDisplay(void) // UPDATE DISPLAY
else // no skip ?
{
if(iDrawnSomething)
#ifdef _WINDOWS
SwapBuffers(wglGetCurrentDC()); // -> swap
#else
glXSwapBuffers(display,window);
#endif
}
iDrawnSomething=0;
@ -1364,6 +1590,10 @@ void updateDisplay(void) // UPDATE DISPLAY
rRatioRect.bottom+i4);
}
#ifdef _WINDOWS
ReleaseDC(hWWindow,hdc); // ! important !
#endif
if(ulKeybits&KEY_RESETTEXSTORE) ResetStuff(); // reset on gpu mode changes? do it before next frame is filled
}
@ -1390,8 +1620,18 @@ void updateFrontDisplay(void)
if(gTexPicName) DisplayPic();
if(ulKeybits&KEY_SHOWFPS) DisplayText();
#ifdef _WINDOWS
{ // windows:
HDC hdc=GetDC(hWWindow);
wglMakeCurrent(hdc,GLCONTEXT); // -> make current again
if(iDrawnSomething)
SwapBuffers(wglGetCurrentDC()); // -> swap
ReleaseDC(hWWindow,hdc); // -> ! important !
}
#else
if(iDrawnSomething) // linux:
glXSwapBuffers(display,window);
#endif
if(iBlurBuffer) UnBlurBackBuffer();
}
@ -1595,6 +1835,20 @@ void updateDisplayIfChanged(void)
if(bUp) updateDisplay(); // yeah, real update (swap buffer)
}
////////////////////////////////////////////////////////////////////////
// window mode <-> fullscreen mode (windows)
////////////////////////////////////////////////////////////////////////
#ifdef _WINDOWS
void ChangeWindowMode(void)
{
GPUclose();
bWindowMode=!bWindowMode;
GPUopen(hWWindow);
bChangeWinMode=FALSE;
}
#endif
////////////////////////////////////////////////////////////////////////
// swap update check (called by psx vsync function)
////////////////////////////////////////////////////////////////////////
@ -1706,6 +1960,10 @@ void CALLBACK GPUupdateLace(void)
{
updateDisplay();
}
#ifdef _WINDOWS
if(bChangeWinMode) ChangeWindowMode();
#endif
}
////////////////////////////////////////////////////////////////////////
@ -1751,7 +2009,11 @@ uint32_t CALLBACK GPUreadStatus(void)
void CALLBACK GPUwriteStatus(uint32_t gdata)
{
uint32_t lCommand=(gdata>>24)&0xff;
#ifdef _WINDOWS
if(bIsFirstFrame) GLinitialize(); // real ogl startup (needed by some emus)
#endif
ulStatusControl[lCommand]=gdata;
switch(lCommand)
@ -2641,6 +2903,8 @@ void CALLBACK GPUwriteData(uint32_t gdata)
// call config dlg
////////////////////////////////////////////////////////////////////////
#ifndef _WINDOWS
void StartCfgTool(char *arg) // linux: start external cfg tool
{
char cfg[256];
@ -2682,6 +2946,19 @@ long CALLBACK GPUconfigure(void)
return 0;
}
#else
long CALLBACK GPUconfigure(void)
{
HWND hWP=GetActiveWindow();
DialogBox(hInst,MAKEINTRESOURCE(IDD_CFGDLG),
hWP,(DLGPROC)CfgDlgProc);
return 0;
}
#endif
////////////////////////////////////////////////////////////////////////
// sets all kind of act fixes
////////////////////////////////////////////////////////////////////////
@ -2758,7 +3035,15 @@ long CALLBACK GPUdmaChain(uint32_t *baseAddrL, uint32_t addr)
void CALLBACK GPUabout(void)
{
#ifdef _WINDOWS
HWND hWP=GetActiveWindow(); // to be sure
DialogBox(hInst,MAKEINTRESOURCE(IDD_DIALOG_ABOUT),
hWP,(DLGPROC)AboutDlgProc);
#else
StartCfgTool("ABOUT");
#endif
}
////////////////////////////////////////////////////////////////////////

View File

@ -126,6 +126,9 @@ GLubyte texrasters[40][12]= {
GLuint gTexFontName=0;
GLuint gTexPicName=0;
GLuint gTexCursorName=0;
#ifdef _WINDOWS
HFONT hGFont=NULL;
#endif
void MakeDisplayLists(void) // MAKE FONT
{
@ -162,6 +165,14 @@ void MakeDisplayLists(void) // MAKE FONT
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, 3, 64, 64, 0, GL_RGB,
GL_UNSIGNED_BYTE,TexBytes);
#ifdef _WINDOWS
hGFont=CreateFont(13,0,0,0,FW_NORMAL,FALSE, // windows: create font for hint texts
FALSE,FALSE,DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,DEFAULT_PITCH,
"Arial");
#endif
}
////////////////////////////////////////////////////////////////////////
@ -170,6 +181,11 @@ void MakeDisplayLists(void) // MAKE FONT
void KillDisplayLists(void)
{
#ifdef _WINDOWS
if(hGFont) DeleteObject(hGFont); // windows: kill info font
hGFont=NULL;
#endif
if(gTexFontName) // del font/info textures
{glDeleteTextures(1,&gTexFontName);gTexFontName=0;}
if(gTexPicName)
@ -555,7 +571,11 @@ void BuildDispMenu(int iInc)
iMPos+=iInc; // up or down
if(iMPos<0) iMPos=9; // wrap around
if(iMPos>9) iMPos=0;
if(iMPos>9) iMPos=0;
#ifdef _WINDOWS
if(gTexPicName) ShowTextGpuPic(); // windows: show the gpu info as well
#endif
}
////////////////////////////////////////////////////////////////////////
@ -573,6 +593,17 @@ void SwitchDispMenu(int iStep)
int iType=0;
bInitCap = TRUE;
#ifdef _WINDOWS
if(iFrameLimit==1 && bUseFrameLimit &&
GetAsyncKeyState(VK_SHIFT)&32768)
{
fFrameRate+=iStep;
if(fFrameRate<3.0f) fFrameRate=3.0f;
SetAutoFrameCap();
break;
}
#endif
if(bUseFrameLimit) iType=iFrameLimit;
iType+=iStep;
if(iType<0) iType=2;
@ -1361,6 +1392,113 @@ void DisplayPic(void)
glEnable(GL_ALPHA_TEST);
glEnable(GL_SCISSOR_TEST);
}
////////////////////////////////////////////////////////////////////////
// windows only: texture with pi-tec sign and version info
////////////////////////////////////////////////////////////////////////
#ifdef _WINDOWS
void ShowGpuPic(void)
{
HRSRC hR;HGLOBAL hG;
unsigned long * pRMem;
unsigned char * pMem;
int x,y;unsigned long * pDMem;
if(gTexPicName) {DestroyPic();return;} // turn off any screen pic, if it does already exist
if(ulKeybits&KEY_SHOWFPS) {ShowTextGpuPic();return;}
hR=FindResource(hInst,MAKEINTRESOURCE(IDB_GPU),RT_BITMAP); // load bitmap from resource
hG=LoadResource(hInst,hR);
pRMem=((unsigned long *)LockResource(hG))+10; // get long ptr to bmp data
pMem=(unsigned char *)malloc(128*96*3); // change the data upside-down
for(y=0;y<96;y++)
{
pDMem=(unsigned long *)(pMem+(95-y)*128*3);
for(x=0;x<96;x++) *pDMem++=*pRMem++;
}
CreatePic(pMem); // show the pic
free(pMem); // clean up
DeleteObject(hG);
}
////////////////////////////////////////////////////////////////////////
void ShowTextGpuPic(void) // CREATE TEXT SCREEN PIC
{ // gets an Text and paints
unsigned char * pMem;BITMAPINFO bmi; // it into a rgb24 bitmap
HDC hdc,hdcMem;HBITMAP hBmp,hBmpMem;HFONT hFontMem; // to display it in the gpu
HBRUSH hBrush,hBrushMem;HPEN hPen,hPenMem;
char szB[256];
RECT r={0,0,128,96}; // size of bmp... don't change that
COLORREF crFrame = RGB(255,255,128); // some example color inits
COLORREF crBkg = RGB(0,0,0);
COLORREF crText = RGB(255,255,0);
if(gTexPicName) DestroyPic();
//----------------------------------------------------// creation of the dc & bitmap
hdc =GetDC(NULL); // create a dc
hdcMem=CreateCompatibleDC(hdc);
ReleaseDC(NULL,hdc);
memset(&bmi,0,sizeof(BITMAPINFO)); // create a 24bit dib
bmi.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biWidth=128;
bmi.bmiHeader.biHeight=-96;
bmi.bmiHeader.biPlanes=1;
bmi.bmiHeader.biBitCount=24;
bmi.bmiHeader.biCompression=BI_RGB;
hBmp=CreateDIBSection(hdcMem,&bmi,DIB_RGB_COLORS,
(void **)&pMem,NULL,0); // pMem will point to 128x96x3 bitmap data
hBmpMem = (HBITMAP)SelectObject(hdcMem,hBmp); // sel the bmp into the dc
//----------------------------------------------------// ok, the following is just a drawing example... change it...
// create & select an additional font... whatever you want to paint, paint it in the dc :)
hBrush=CreateSolidBrush(crBkg);
hPen=CreatePen(PS_SOLID,0,crFrame);
hBrushMem = (HBRUSH)SelectObject(hdcMem,hBrush);
hPenMem = (HPEN)SelectObject(hdcMem,hPen);
hFontMem = (HFONT)SelectObject(hdcMem,hGFont);
SetTextColor(hdcMem,crText);
SetBkColor(hdcMem,crBkg);
Rectangle(hdcMem,r.left,r.top,r.right,r.bottom); // our example: fill rect and paint border
InflateRect(&r,-3,-2); // reduce the text area
LoadString(hInst,IDS_INFO0+iMPos,szB,255);
DrawText(hdcMem,szB,strlen(szB),&r, // paint the text (including clipping and word break)
DT_LEFT|DT_WORDBREAK);
//----------------------------------------------------// ok, now store the pMem data, or just call the gpu func
CreatePic(pMem);
//----------------------------------------------------// finished, now we clean up... needed, or you will get resource leaks :)
SelectObject(hdcMem,hBmpMem); // sel old mem dc objects
SelectObject(hdcMem,hBrushMem);
SelectObject(hdcMem,hPenMem);
SelectObject(hdcMem,hFontMem);
DeleteDC(hdcMem); // delete mem dcs
DeleteObject(hBmp);
DeleteObject(hBrush); // delete created objects
DeleteObject(hPen);
}
////////////////////////////////////////////////////////////////////////
#endif
////////////////////////////////////////////////////////////////////////
// show gun cursor

View File

@ -36,6 +36,10 @@ void SwitchDispMenu(int iStep);
void CreatePic(unsigned char * pMem);
void DisplayPic(void);
void DestroyPic(void);
#ifdef _WINDOWS
void ShowGpuPic(void);
void ShowTextGpuPic(void);
#endif
void ShowGunCursor(void);
#endif // _GL_MENU_H_

View File

@ -1188,6 +1188,26 @@ static int left_R, delta_left_R, right_R, delta_right_R;
static int left_G, delta_left_G, right_G, delta_right_G;
static int left_B, delta_left_B, right_B, delta_right_B;
#ifdef _MSC_VER
#pragma warning (disable : 4035)
__inline int shl10idiv(int x, int y)
{
__asm
{
mov eax,x
mov ebx,y
mov edx, eax
shl eax, 10
sar edx, 22
idiv ebx
// return result in eax
}
}
#else
__inline int shl10idiv(int x, int y)
{
long long int bi=x;
@ -1195,6 +1215,8 @@ __inline int shl10idiv(int x, int y)
return bi/y;
}
#endif
__inline int RightSection_F(void)
{
soft_vertex * v1 = right_array[ right_section ];

View File

@ -16,6 +16,28 @@
* *
***************************************************************************/
#ifdef _WINDOWS
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <stdarg.h>
#include <windows.h>
#include <windowsx.h>
#include <tchar.h>
#include <mmsystem.h>
#include "resource.h"
#pragma warning (disable:4244)
#pragma warning (disable:4761)
#include <GL/gl.h>
#else
#define __X11_C_
#define __inline inline
@ -32,14 +54,17 @@
#include <X11/cursorfont.h>
#define CALLBACK /* */
#define __inline inline
#endif
#include "gl_ext.h"
#define SHADETEXBIT(x) ((x>>24) & 0x1)
#define SEMITRANSBIT(x) ((x>>25) & 0x1)
#ifndef _WINDOWS
#ifndef GL_BGRA_EXT
#define GL_BGRA_EXT GL_BGRA
#endif
#define GL_COLOR_INDEX8_EXT 0x80E5
#endif

View File

@ -145,7 +145,11 @@ unsigned short (*PTCF[2]) (unsigned short);
////////////////////////////////////////////////////////////////////////
// texture cache implementation
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
#ifdef _WINDOWS
#pragma pack(1)
#endif
// "texture window" cache entry
@ -171,6 +175,10 @@ typedef struct textureSubCacheEntryTagS
unsigned char cTexID;
unsigned char Opaque;
} textureSubCacheEntryS;
#ifdef _WINDOWS
#pragma pack()
#endif
//---------------------------------------------

View File

@ -0,0 +1,359 @@
[Project]
FileName=DFSound.dev
Name=DFSound
Ver=1
IsCpp=1
Type=3
Compiler=-W -DWIN32 -DNDEBUG -D_WINDOWS_@@_
CppCompiler=-W -DWIN32 -DNDEBUG -D_WINDOWS_@@_
Includes=.\\;.\winsrc;..\..\..\plugins\dfsound;..\..\glue;..\..\..\libpcsxcore
Linker=--enable-stdcall-fixup -ldsound -lwinmm -luser32 -lgdi32 -ladvapi32 -def DFSound.def_@@_
Libs=
UnitCount=31
Folders=dfsound,winsrc
ObjFiles=
PrivateResource=DFSound_private.rc
ResourceIncludes=
MakeIncludes=
Icon=
ExeOutput=
ObjectOutput=
OverrideOutput=0
OverrideOutputName=DFSound.exe
HostApplication=
CommandLine=
UseCustomMakefile=0
CustomMakefile=
IncludeVersionInfo=0
SupportXPThemes=0
CompilerSet=0
CompilerSettings=0010000001001000010100
[Unit1]
FileName=winsrc\cfg.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit2]
FileName=winsrc\debug.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit3]
FileName=winsrc\debug.h
Folder=winsrc
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit4]
FileName=winsrc\dsound.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit5]
FileName=winsrc\dsound.h
Folder=winsrc
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit6]
FileName=winsrc\psemu.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit7]
FileName=winsrc\record.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit8]
FileName=winsrc\record.h
Folder=winsrc
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit9]
FileName=winsrc\winmain.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit10]
FileName=..\..\..\plugins\dfsound\adsr.c
Folder=dfsound
Compile=0
CompileCpp=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c adsr.c -o adsr.o $(CFLAGS)
[Unit11]
FileName=..\..\..\plugins\dfsound\adsr.h
Folder=dfsound
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit12]
FileName=..\..\..\plugins\dfsound\dma.c
Folder=dfsound
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit13]
FileName=..\..\..\plugins\dfsound\dma.h
Folder=dfsound
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit14]
FileName=..\..\..\plugins\dfsound\dsoundoss.h
Folder=dfsound
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit15]
FileName=..\..\..\plugins\dfsound\externals.h
Folder=dfsound
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit16]
FileName=..\..\..\plugins\dfsound\freeze.c
Folder=dfsound
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit17]
FileName=..\..\..\plugins\dfsound\gauss_i.h
Folder=dfsound
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit18]
FileName=..\..\..\plugins\dfsound\psemuxa.h
Folder=dfsound
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit19]
FileName=..\..\..\plugins\dfsound\registers.c
Folder=dfsound
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit20]
FileName=..\..\..\plugins\dfsound\registers.h
Folder=dfsound
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit21]
FileName=..\..\..\plugins\dfsound\regs.h
Folder=dfsound
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit22]
FileName=..\..\..\plugins\dfsound\reverb.c
Folder=dfsound
Compile=0
CompileCpp=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c reverb.c -o reverb.o $(CFLAGS)
[Unit23]
FileName=..\..\..\plugins\dfsound\reverb.h
Folder=dfsound
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit24]
FileName=..\..\..\plugins\dfsound\spu.c
Folder=dfsound
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit25]
FileName=..\..\..\plugins\dfsound\spu.h
Folder=dfsound
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit26]
FileName=..\..\..\plugins\dfsound\stdafx.h
Folder=dfsound
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit27]
FileName=..\..\..\plugins\dfsound\xa.c
Folder=dfsound
Compile=0
CompileCpp=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c xa.c -o xa.o $(CFLAGS)
[Unit28]
FileName=..\..\..\plugins\dfsound\xa.h
Folder=dfsound
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit29]
FileName=DFSound.def
Folder=
Compile=0
CompileCpp=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit30]
FileName=DFSound.rc
Folder=Resources
Compile=1
CompileCpp=1
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit31]
FileName=resource.h
Folder=
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[VersionInfo]
Major=0
Minor=1
Release=1
Build=1
LanguageID=1033
CharsetID=1252
CompanyName=
FileVersion=0.1
FileDescription=Developed using the Dev-C++ IDE
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=DFSound.exe
ProductName=DFSound
ProductVersion=0.1
AutoIncBuildNr=0

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /G5 /MD /W3 /GX /O2 /I ".\winsrc" /I "..\..\..\plugins\dfsound" /I "..\..\glue" /I "..\..\..\libpcsxcore" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /YX /FD /c
# ADD CPP /nologo /G5 /MD /W3 /GX /O2 /I ".\\" /I ".\winsrc" /I "..\..\..\plugins\dfsound" /I "..\..\glue" /I "..\..\..\libpcsxcore" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "NDEBUG"
@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".\winsrc" /I "..\..\..\plugins\dfsound" /I "..\..\glue" /I "..\..\..\libpcsxcore" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".\\" /I ".\winsrc" /I "..\..\..\plugins\dfsound" /I "..\..\glue" /I "..\..\..\libpcsxcore" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "_DEBUG"
@ -92,26 +92,6 @@ LINK32=link.exe
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\winsrc\bitmap1.bmp
# End Source File
# Begin Source File
SOURCE=.\winsrc\bitmap2.bmp
# End Source File
# Begin Source File
SOURCE=.\winsrc\bitmap3.bmp
# End Source File
# Begin Source File
SOURCE=.\winsrc\bitmap4.bmp
# End Source File
# Begin Source File
SOURCE=.\winsrc\bitmap5.bmp
# End Source File
# Begin Source File
SOURCE=.\winsrc\cfg.c
# End Source File
# Begin Source File
@ -124,14 +104,6 @@ SOURCE=.\winsrc\debug.h
# End Source File
# Begin Source File
SOURCE=.\winsrc\DFSound.def
# End Source File
# Begin Source File
SOURCE=.\winsrc\DFSound.rc
# End Source File
# Begin Source File
SOURCE=.\winsrc\dsound.c
# End Source File
# Begin Source File
@ -152,10 +124,6 @@ SOURCE=.\winsrc\record.h
# End Source File
# Begin Source File
SOURCE=.\winsrc\resource.h
# End Source File
# Begin Source File
SOURCE=.\winsrc\winmain.c
# End Source File
# End Group
@ -266,5 +234,17 @@ SOURCE=..\..\..\plugins\dfsound\xa.c
SOURCE=..\..\..\plugins\dfsound\xa.h
# End Source File
# End Group
# Begin Source File
SOURCE=.\DFSound.def
# End Source File
# Begin Source File
SOURCE=.\DFSound.rc
# End Source File
# Begin Source File
SOURCE=.\resource.h
# End Source File
# End Target
# End Project

View File

@ -411,7 +411,6 @@ BEGIN
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif\r\n"
"#include ""afxres.rc"" // Standard components\r\n"
"#endif\0"
END
@ -435,11 +434,11 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
// Bitmap
//
IDB_BITMAP1 BITMAP MOVEABLE PURE "bitmap1.bmp"
IDB_BITMAP2 BITMAP MOVEABLE PURE "bitmap2.bmp"
IDB_BITMAP3 BITMAP MOVEABLE PURE "bitmap3.bmp"
IDB_BITMAP4 BITMAP MOVEABLE PURE "bitmap4.bmp"
IDB_BITMAP5 BITMAP MOVEABLE PURE "bitmap5.bmp"
IDB_BITMAP1 BITMAP MOVEABLE PURE "res\\bitmap1.bmp"
IDB_BITMAP2 BITMAP MOVEABLE PURE "res\\bitmap2.bmp"
IDB_BITMAP3 BITMAP MOVEABLE PURE "res\\bitmap3.bmp"
IDB_BITMAP4 BITMAP MOVEABLE PURE "res\\bitmap4.bmp"
IDB_BITMAP5 BITMAP MOVEABLE PURE "res\\bitmap5.bmp"
#endif // German (Germany) resources
/////////////////////////////////////////////////////////////////////////////
@ -460,7 +459,6 @@ IDB_BITMAP5 BITMAP MOVEABLE PURE "bitmap5.bmp"
LANGUAGE 9, 1
#pragma code_page(1252)
#endif
#include "afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

Before

Width:  |  Height:  |  Size: 230 B

After

Width:  |  Height:  |  Size: 230 B

View File

Before

Width:  |  Height:  |  Size: 230 B

After

Width:  |  Height:  |  Size: 230 B

View File

Before

Width:  |  Height:  |  Size: 230 B

After

Width:  |  Height:  |  Size: 230 B

View File

Before

Width:  |  Height:  |  Size: 230 B

After

Width:  |  Height:  |  Size: 230 B

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,379 @@
[Project]
FileName=DFXVideo.dev
Name=DFXVideo
Ver=1
IsCpp=1
Type=3
Compiler=-W -DWIN32 -DNDEBUG -D_WINDOWS -D__i386___@@_
CppCompiler=-W -DWIN32 -DNDEBUG -D_WINDOWS -D__i386___@@_
Includes=.\\;.\winsrc;..\..;..\..\glue;..\..\..\libpcsxcore;..\..\..\plugins\dfxvideo
Linker=-luser32 -lgdi32 -lwinmm -ladvapi32 -lvfw32 -def DFXVideo.def --enable-stdcall-fixup_@@_
Libs=
UnitCount=33
Folders=dfxvideo,winsrc,winsrc/directx
ObjFiles=
PrivateResource=DFXVideo_private.rc
ResourceIncludes=
MakeIncludes=
Icon=
ExeOutput=
ObjectOutput=
OverrideOutput=0
OverrideOutputName=DFXVideo.exe
HostApplication=
CommandLine=
UseCustomMakefile=0
CustomMakefile=
IncludeVersionInfo=0
SupportXPThemes=0
CompilerSet=0
CompilerSettings=0010000001001000000100
[Unit1]
FileName=winsrc\d3d.h
Folder=winsrc/directx
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit2]
FileName=winsrc\d3dcaps.h
Folder=winsrc/directx
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit3]
FileName=winsrc\d3dtypes.h
Folder=winsrc/directx
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit4]
FileName=winsrc\ddraw.h
Folder=winsrc/directx
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit5]
FileName=winsrc\dxguid.c
Folder=winsrc/directx
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit6]
FileName=winsrc\cfg.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit7]
FileName=winsrc\draw.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit8]
FileName=winsrc\fps.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit9]
FileName=winsrc\key.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit10]
FileName=winsrc\record.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit11]
FileName=winsrc\record.h
Folder=winsrc
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit12]
FileName=winsrc\winmain.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit13]
FileName=..\..\..\plugins\dfxvideo\cfg.h
Folder=dfxvideo
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit14]
FileName=..\..\..\plugins\dfxvideo\draw.h
Folder=dfxvideo
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit15]
FileName=..\..\..\plugins\dfxvideo\externals.h
Folder=dfxvideo
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit16]
FileName=..\..\..\plugins\dfxvideo\fps.h
Folder=dfxvideo
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit17]
FileName=..\..\..\plugins\dfxvideo\gpu.c
Folder=dfxvideo
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit18]
FileName=..\..\..\plugins\dfxvideo\gpu.h
Folder=dfxvideo
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit19]
FileName=..\..\..\plugins\dfxvideo\hq2x.h
Folder=dfxvideo
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit20]
FileName=..\..\..\plugins\dfxvideo\hq3x.h
Folder=dfxvideo
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit21]
FileName=..\..\..\plugins\dfxvideo\interp.h
Folder=dfxvideo
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit22]
FileName=..\..\..\plugins\dfxvideo\key.h
Folder=dfxvideo
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit23]
FileName=..\..\..\plugins\dfxvideo\menu.c
Folder=dfxvideo
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit24]
FileName=..\..\..\plugins\dfxvideo\menu.h
Folder=dfxvideo
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit25]
FileName=..\..\..\plugins\dfxvideo\prim.c
Folder=dfxvideo
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit26]
FileName=..\..\..\plugins\dfxvideo\prim.h
Folder=dfxvideo
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit27]
FileName=..\..\..\plugins\dfxvideo\soft.c
Folder=dfxvideo
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit28]
FileName=..\..\..\plugins\dfxvideo\soft.h
Folder=dfxvideo
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit29]
FileName=..\..\..\plugins\dfxvideo\swap.h
Folder=dfxvideo
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit30]
FileName=..\..\..\plugins\dfxvideo\zn.c
Folder=dfxvideo
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit31]
FileName=DFXVideo.def
Folder=
Compile=0
CompileCpp=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit32]
FileName=DFXVideo.rc
Folder=Resources
Compile=1
CompileCpp=1
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit33]
FileName=resource.h
Folder=
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[VersionInfo]
Major=0
Minor=1
Release=1
Build=1
LanguageID=1033
CharsetID=1252
CompanyName=
FileVersion=0.1
FileDescription=Developed using the Dev-C++ IDE
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=DFXVideo.exe
ProductName=DFXVideo
ProductVersion=0.1
AutoIncBuildNr=0

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /G5 /MD /W3 /GX /O2 /I ".\winsrc" /I "..\.." /I "..\..\glue" /I "..\..\..\libpcsxcore" /I "..\..\..\plugins\dfxvideo" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "__i386__" /FR /YX /FD /c
# ADD CPP /nologo /G5 /MD /W3 /GX /O2 /I ".\\" /I ".\winsrc" /I "..\.." /I "..\..\glue" /I "..\..\..\libpcsxcore" /I "..\..\..\plugins\dfxvideo" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "__i386__" /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "NDEBUG"
@ -73,7 +73,7 @@ PostBuild_Cmds=rem copy release\DFXVideo.dll d:\emus\epsxe\plugins rem copy rel
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".\winsrc" /I "..\..\glue" /I "..\..\..\libpcsxcore" /I "..\..\..\plugins\dfxvideo" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".\\" /I ".\winsrc" /I "..\..\glue" /I "..\..\..\libpcsxcore" /I "..\..\..\plugins\dfxvideo" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "_DEBUG"
@ -124,14 +124,6 @@ SOURCE=.\winsrc\cfg.c
# End Source File
# Begin Source File
SOURCE=.\winsrc\DFXVideo.def
# End Source File
# Begin Source File
SOURCE=.\winsrc\DFXVideo.rc
# End Source File
# Begin Source File
SOURCE=.\winsrc\draw.c
# End Source File
# Begin Source File
@ -140,10 +132,6 @@ SOURCE=.\winsrc\fps.c
# End Source File
# Begin Source File
SOURCE=.\winsrc\gpu.bmp
# End Source File
# Begin Source File
SOURCE=.\winsrc\key.c
# End Source File
# Begin Source File
@ -156,10 +144,6 @@ SOURCE=.\winsrc\record.h
# End Source File
# Begin Source File
SOURCE=.\winsrc\resource.h
# End Source File
# Begin Source File
SOURCE=.\winsrc\winmain.c
# End Source File
# End Group
@ -239,5 +223,17 @@ SOURCE=..\..\..\plugins\dfxvideo\swap.h
SOURCE=..\..\..\plugins\dfxvideo\zn.c
# End Source File
# End Group
# Begin Source File
SOURCE=.\DFXVideo.def
# End Source File
# Begin Source File
SOURCE=.\DFXVideo.rc
# End Source File
# Begin Source File
SOURCE=.\resource.h
# End Source File
# End Target
# End Project

View File

@ -18,7 +18,7 @@
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#pragma code_page(936)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
@ -26,7 +26,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
// Bitmap
//
IDB_GPU BITMAP DISCARDABLE "gpu.bmp"
IDB_GPU BITMAP DISCARDABLE "res\\gpu.bmp"
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
@ -460,6 +460,7 @@ BEGIN
END
#endif // APSTUDIO_INVOKED
#ifdef _MSC_VER
/////////////////////////////////////////////////////////////////////////////
//
@ -522,6 +523,7 @@ BEGIN
0
END
#endif
/////////////////////////////////////////////////////////////////////////////
//

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by gpuPeopsSoft.rc
// Used by DFXVideo.rc
//
#define IDS_INFO0 1
#define IDS_INFO1 2

View File

@ -0,0 +1,36 @@
; gpuPeopsOpenGL.def : Declares the module parameters for the DLL.
LIBRARY "gpuPeopsOpenGL"
DESCRIPTION 'gpuPeopsOpenGL OpenGL Windows Dynamic Link Library'
EXPORTS
; Explicit exports can go here
PSEgetLibType @2
PSEgetLibName @3
PSEgetLibVersion @4
GPUinit @5
GPUshutdown @6
GPUopen @7
GPUclose @8
GPUconfigure @9
GPUabout @10
GPUtest @11
GPUwriteData @12
GPUwriteStatus @13
GPUreadData @14
GPUreadStatus @15
GPUdmaChain @16
GPUupdateLace @17
GPUmakeSnapshot @18
GPUwriteDataMem @19
GPUreadDataMem @20
GPUdisplayFlags @21
GPUfreeze @22
GPUgetScreenPic @23
GPUshowScreenPic @24
GPUcursor @25
GPUsetfix @26
GPUsetframelimit @27
GPUvisualVibration @28

View File

@ -0,0 +1,319 @@
[Project]
FileName=gpuPeopsOpenGL.dev
Name=gpuPeopsOpenGL
Ver=1
IsCpp=1
Type=3
Compiler=-W -DWIN32 -DNDEBUG -D_WINDOWS_@@_
CppCompiler=-W -DWIN32 -DNDEBUG -D_WINDOWS_@@_
Includes=.\\;.\winsrc;..\..\glue;..\..\..\libpcsxcore;..\..\..\plugins\peopsxgl
Linker=-luser32 -lgdi32 -lopengl32 -lwinmm -ladvapi32 -def gpuPeopsOpenGL.def --enable-stdcall-fixup_@@_
Libs=
UnitCount=27
Folders=peopsxgl,winsrc
ObjFiles=
PrivateResource=gpuPeopsOpenGL_private.rc
ResourceIncludes=
MakeIncludes=
Icon=
ExeOutput=
ObjectOutput=
OverrideOutput=0
OverrideOutputName=gpuPeopsOpenGL.exe
HostApplication=
CommandLine=
UseCustomMakefile=0
CustomMakefile=
IncludeVersionInfo=0
SupportXPThemes=0
CompilerSet=0
CompilerSettings=0010000001001000000000
[Unit1]
FileName=winsrc\cfg.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit2]
FileName=winsrc\fps.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit3]
FileName=winsrc\key.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit4]
FileName=winsrc\ssave.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit5]
FileName=winsrc\ssave.h
Folder=winsrc
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit6]
FileName=winsrc\winmain.c
Folder=winsrc
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit7]
FileName=..\..\..\plugins\peopsxgl\cfg.h
Folder=peopsxgl
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit8]
FileName=..\..\..\plugins\peopsxgl\draw.c
Folder=peopsxgl
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit9]
FileName=..\..\..\plugins\peopsxgl\draw.h
Folder=peopsxgl
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit10]
FileName=..\..\..\plugins\peopsxgl\externals.h
Folder=peopsxgl
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit11]
FileName=..\..\..\plugins\peopsxgl\fps.h
Folder=peopsxgl
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit12]
FileName=..\..\..\plugins\peopsxgl\gl_ext.h
Folder=peopsxgl
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit13]
FileName=..\..\..\plugins\peopsxgl\gpu.c
Folder=peopsxgl
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit14]
FileName=..\..\..\plugins\peopsxgl\gpu.h
Folder=peopsxgl
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit15]
FileName=..\..\..\plugins\peopsxgl\key.h
Folder=peopsxgl
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit16]
FileName=..\..\..\plugins\peopsxgl\menu.c
Folder=peopsxgl
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit17]
FileName=..\..\..\plugins\peopsxgl\menu.h
Folder=peopsxgl
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit18]
FileName=..\..\..\plugins\peopsxgl\prim.c
Folder=peopsxgl
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit19]
FileName=..\..\..\plugins\peopsxgl\prim.h
Folder=peopsxgl
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit20]
FileName=..\..\..\plugins\peopsxgl\soft.c
Folder=peopsxgl
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit21]
FileName=..\..\..\plugins\peopsxgl\soft.h
Folder=peopsxgl
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit22]
FileName=..\..\..\plugins\peopsxgl\stdafx.h
Folder=peopsxgl
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit23]
FileName=..\..\..\plugins\peopsxgl\texture.c
Folder=peopsxgl
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit24]
FileName=..\..\..\plugins\peopsxgl\texture.h
Folder=peopsxgl
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit25]
FileName=gpuPeopsOpenGL.def
Folder=
Compile=0
CompileCpp=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit26]
FileName=gpuPeopsOpenGL.rc
Folder=Resources
Compile=1
CompileCpp=1
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit27]
FileName=resource.h
Folder=
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[VersionInfo]
Major=0
Minor=1
Release=1
Build=1
LanguageID=1033
CharsetID=1252
CompanyName=
FileVersion=0.1
FileDescription=Developed using the Dev-C++ IDE
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=gpuPeopsOpenGL.exe
ProductName=gpuPeopsOpenGL
ProductVersion=0.1
AutoIncBuildNr=0

View File

@ -0,0 +1,210 @@
# Microsoft Developer Studio Project File - Name="gpuPeopsOpenGL" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=gpuPeopsOpenGL - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "gpuPeopsOpenGL.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "gpuPeopsOpenGL.mak" CFG="gpuPeopsOpenGL - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "gpuPeopsOpenGL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "gpuPeopsOpenGL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "gpuPeopsOpenGL - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /G5 /MD /W3 /GX /O2 /I ".\\" /I ".\winsrc" /I "..\..\glue" /I "..\..\..\libpcsxcore" /I "..\..\..\plugins\peopsxgl" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "NDEBUG"
# ADD RSC /l 0x407 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 user32.lib gdi32.lib opengl32.lib winmm.lib advapi32.lib /nologo /subsystem:windows /dll /machine:I386
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Cmds=rem copy release\*.dll d:\emus\epsxe\plugins
# End Special Build Tool
!ELSEIF "$(CFG)" == "gpuPeopsOpenGL - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".\\" /I ".\winsrc" /I "..\..\glue" /I "..\..\..\libpcsxcore" /I "..\..\..\plugins\peopsxgl" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "_DEBUG"
# ADD RSC /l 0x407 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "gpuPeopsOpenGL - Win32 Release"
# Name "gpuPeopsOpenGL - Win32 Debug"
# Begin Group "winsrc"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\winsrc\cfg.c
# End Source File
# Begin Source File
SOURCE=.\winsrc\fps.c
# End Source File
# Begin Source File
SOURCE=.\winsrc\key.c
# End Source File
# Begin Source File
SOURCE=.\winsrc\ssave.c
# End Source File
# Begin Source File
SOURCE=.\winsrc\ssave.h
# End Source File
# Begin Source File
SOURCE=.\winsrc\winmain.c
# End Source File
# End Group
# Begin Group "peopsxgl"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\cfg.h
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\draw.c
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\draw.h
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\externals.h
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\fps.h
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\gl_ext.h
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\gpu.c
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\gpu.h
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\key.h
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\menu.c
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\menu.h
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\prim.c
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\prim.h
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\soft.c
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\soft.h
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\stdafx.h
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\texture.c
# End Source File
# Begin Source File
SOURCE=..\..\..\plugins\peopsxgl\texture.h
# End Source File
# End Group
# Begin Source File
SOURCE=.\gpuPeopsOpenGL.def
# End Source File
# Begin Source File
SOURCE=.\gpuPeopsOpenGL.rc
# End Source File
# Begin Source File
SOURCE=.\resource.h
# End Source File
# End Target
# End Project

View File

@ -0,0 +1,555 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_GPU BITMAP DISCARDABLE "res\\gpu.bmp"
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif\r\n"
"#endif\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,78,0,0
PRODUCTVERSION 1,78,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "gpuPeopsOpenGL. DLL\0"
VALUE "FileVersion", "1, 78, 0, 0\0"
VALUE "InternalName", "P.E.Op.S. PSX OpenGL GPU (mod)\0"
VALUE "LegalCopyright", "Copyright (C) 1999-2009\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "gpuPeopsOpenGL.DLL\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "gpuPeopsOpenGL Dynamic Link Library\0"
VALUE "ProductVersion", "1, 78, 0, 0\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_DIALOG_ABOUT DIALOG DISCARDABLE 0, 0, 258, 165
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About P.E.Op.S. PSX OpenGL Renderer ..."
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,98,145,50,14
RTEXT "Version:",IDC_STATIC,8,6,49,10
RTEXT "Coded by:",IDC_STATIC,8,35,49,10
RTEXT "Homepage:",IDC_STATIC,8,53,49,10
LTEXT "1.78",IDC_STATIC,60,6,159,9
LTEXT "Pete Bernert",IDC_STATIC,60,35,159,10
LTEXT "www.pbernert.com",IDC_STATIC,60,53,159,10
RTEXT "Release date:",IDC_STATIC,8,17,49,10
LTEXT "04/2009",IDC_STATIC,60,17,159,10
RTEXT "Thanks to:",IDC_STATIC,8,74,49,10
LTEXT "Lewpy - without his infos this driver wouldn't exist",
IDC_STATIC,60,74,159,10
LTEXT "Duddie && FoxPro - for their public sources",IDC_STATIC,
60,86,159,10
LTEXT "My girlfriend Heike - 'Hey, that cloud still looks funny, ",
IDC_STATIC,60,112,170,10
LTEXT "go on and change it...'",IDC_STATIC,125,121,117,10
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME | SS_SUNKEN,4,68,
249,70
LTEXT "Gamma - thanks for your OpenGL book",IDC_STATIC,60,99,
159,10
END
IDD_CFGDLG DIALOGEX 0, 0, 413, 295
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Configure P.E.Op.S. PSX OpenGL Renderer ..."
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "Fullscreen mode",IDC_DISPMODE1,"Button",
BS_AUTORADIOBUTTON,11,11,73,10
CONTROL "Window mode",IDC_DISPMODE2,"Button",BS_AUTORADIOBUTTON,
11,25,63,10
COMBOBOX IDC_RESOLUTION,150,10,63,64,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COLORDEPTH,261,10,36,64,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
EDITTEXT IDC_WINX,150,24,26,12,ES_AUTOHSCROLL
EDITTEXT IDC_WINY,187,24,26,12,ES_AUTOHSCROLL
CONTROL "Keep psx aspect ratio",IDC_ARATIO,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,306,17,95,12
COMBOBOX IDC_TEXQUALITY,61,50,159,64,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_FILTERTYPE,61,63,159,83,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_HIRESTEX,275,50,129,64,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_VRAMSIZE,275,63,62,88,CBS_DROPDOWN | WS_VSCROLL |
WS_TABSTOP
CONTROL "Show FPS display on startup",IDC_SHOWFPS,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,12,94,107,10
PUSHBUTTON "...",IDC_KEYCONFIG,119,94,11,10,0,WS_EX_STATICEDGE
CONTROL "Use FPS limit",IDC_USELIMIT,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,149,89,73,10
CONTROL "Use Frame skipping",IDC_USESKIP,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,149,101,78,10
CONTROL "Auto-detect FPS/Frame skipping limit",IDC_FRAMEAUTO,
"Button",BS_AUTORADIOBUTTON | WS_GROUP,258,89,131,9
CONTROL "FPS limit (10-200) :",IDC_FRAMEMANUELL,"Button",
BS_AUTORADIOBUTTON,258,100,72,10
EDITTEXT IDC_FRAMELIMIT,334,99,29,12,ES_AUTOHSCROLL
COMBOBOX IDC_OFFSCREEN,78,123,130,64,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_FRAMETEX,78,136,130,64,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_FRAMEREAD,78,149,130,64,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
CONTROL "Alpha MultiPass",IDC_OPAQUE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,219,127,66,10
CONTROL "Mask bit",IDC_USEMASK,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,219,138,47,10
CONTROL "Advanced blending",IDC_ADVBLEND,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,219,149,76,10
CONTROL "Scanlines",IDC_USESCANLINES,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,11,176,46,10
EDITTEXT IDC_SCANBLEND,375,175,29,12,ES_AUTOHSCROLL
CONTROL "Line mode",IDC_USELINES,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,11,186,48,10
CONTROL "Unfiltered framebuffer updates",IDC_FASTMDEC,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,196,113,10
CONTROL "Force 15 bit framebuffer updates",IDC_FASTMDEC2,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,206,121,10
CONTROL "Color dithering",IDC_DRAWDITHER,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,216,81,10
CONTROL "Screen smoothing",IDC_BLUR,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,11,226,81,10
CONTROL "Disable screensaver",IDC_SSAVE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,11,236,81,10
CONTROL "Special game fixes",IDC_GAMEFIX,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,246,75,10
PUSHBUTTON "...",IDC_SELFIX,89,246,11,10,0,WS_EX_STATICEDGE
PUSHBUTTON "Fast",IDC_DEF1,10,272,34,14
PUSHBUTTON "Nice",IDC_DEF2,49,272,34,14
DEFPUSHBUTTON "OK",IDOK,113,272,84,14
PUSHBUTTON "Cancel",IDCANCEL,215,272,84,14
PUSHBUTTON "Copy settings\n to clipboard",IDC_CLIPBOARD,322,266,87,
25,BS_MULTILINE,WS_EX_STATICEDGE
GROUPBOX "Misc",IDC_STATIC,3,166,406,95
GROUPBOX "Default settings",IDC_STATIC,3,262,88,30
GROUPBOX "Textures",IDC_STATIC,3,41,406,40
RTEXT "Desktop resolution:",IDC_STATIC,81,12,65,9
GROUPBOX "Resolution && Colors",IDC_STATIC,3,1,406,40
RTEXT "Color depth:",IDC_STATIC,219,12,39,9
GROUPBOX "Framerate",IDC_STATIC,3,81,406,33
LTEXT "FPS",IDC_STATIC,367,100,17,9,SS_CENTERIMAGE
GROUPBOX "Compatibility",IDC_STATIC,3,115,406,51
RTEXT "Texture quality:",IDC_QUALTXT,6,52,51,9
RTEXT "Window size:",IDC_STATIC,85,26,61,9
CTEXT "x",IDC_STATIC,177,26,8,9
RTEXT "Gfx card vram:",IDC_QUALTXT2,225,65,48,9
RTEXT "Off-Screen drawing:",IDC_STATIC,11,124,64,10,
SS_CENTERIMAGE
RTEXT "Texture filtering:",IDC_STATIC,6,65,52,10
RTEXT "Framebuffer textures:",IDC_STATIC,7,137,68,10,
SS_CENTERIMAGE
LTEXT "Some games will need certain special options to work without glitches",
IDC_STATIC,135,246,242,9,SS_CENTERIMAGE
LTEXT "Smoother shading in 16 bit color depth",IDC_STATIC,135,
216,242,9,SS_CENTERIMAGE
LTEXT "Small speed up with mdecs",IDC_STATIC,135,196,242,9,
SS_CENTERIMAGE
LTEXT "Polygons will not get filled",IDC_STATIC,135,186,89,9,
SS_CENTERIMAGE
LTEXT "TV screen alike lines",IDC_STATIC,135,176,69,9,
SS_CENTERIMAGE
LTEXT "Accurate psx color emulation",IDC_STATIC,303,149,97,9,
SS_CENTERIMAGE
LTEXT "Correct opaque texture areas",IDC_STATIC,302,127,97,9,
SS_CENTERIMAGE
LTEXT "Needed by a few games",IDC_STATIC,302,138,97,9,
SS_CENTERIMAGE
RTEXT "Scanline brightness (0...255, -1=Monitor dot matrix):",
IDC_STATIC,210,176,162,9,SS_CENTERIMAGE
EDITTEXT IDC_CLPEDIT,314,283,6,12,ES_MULTILINE | ES_AUTOVSCROLL |
ES_AUTOHSCROLL | NOT WS_VISIBLE
LTEXT "MBytes",IDC_QUALTXT3,340,65,27,9
LTEXT "The complete screen will get smoothed. Very slow on some cards, lotta vram needed",
IDC_STATIC,135,226,269,9,SS_CENTERIMAGE
RTEXT "Framebuffer access:",IDC_STATIC,7,150,68,10,
SS_CENTERIMAGE
LTEXT "Disable screensavers and power saving modes. Not available in Win95/WinNT",
IDC_STATIC,135,236,269,9,SS_CENTERIMAGE
LTEXT "Speed up with mdecs in 32 bit color depth, but less colorful",
IDC_T14_STATIC2,135,206,268,9,SS_CENTERIMAGE
RTEXT "Hi-Res textures:",IDC_QUALTXT4,223,52,50,9
COMBOBOX IDC_VSYNC,261,24,36,64,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
RTEXT "V-Sync:",IDC_STATIC,219,26,39,9,SS_CENTERIMAGE
END
IDD_FIXES DIALOG DISCARDABLE 0, 0, 316, 322
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Special game fixes..."
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "0x00001: Adjust framebuffer access",IDC_FIX1,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,30,133,10
CONTROL "0x00004: Ignore black brightness",IDC_FIX3,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,60,140,10
CONTROL "0x00008: Swap front/back detection",IDC_FIX4,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,75,144,10
CONTROL "0x00010: Disable coord check",IDC_FIX5,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,90,139,10
CONTROL "0x00020: Remove blue glitches",IDC_FIX6,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,105,139,10
CONTROL "0x00040: Mixed software FB access",IDC_FIX7,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,120,143,10
CONTROL "0x00080: Use PC fps calculation",IDC_FIX8,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,135,142,10
CONTROL "0x00100: Use old frame skipping",IDC_FIX9,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,150,139,10
CONTROL "0x00002: Direct framebuffer updates",IDC_FIX2,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,45,137,10
CONTROL "0x00200: G4 polygon cache",IDC_FIX10,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,165,141,10
CONTROL "0x00400: Fake subtractive blending",IDC_FIX11,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,180,143,10
CONTROL "0x00800: Lazy upload detection",IDC_FIX12,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,195,144,10
CONTROL "0x01000: Odd/even bit hack",IDC_FIX13,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,210,143,10
CONTROL "0x02000: Expand screen width",IDC_FIX14,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,225,144,10
DEFPUSHBUTTON "OK",IDOK,83,302,50,14
PUSHBUTTON "Cancel",IDCANCEL,182,302,50,14
LTEXT "Activate the following options only if you want to play one of the listed games (or if your game is showing similar glitches)!",
IDC_STATIC,7,4,246,22
LTEXT "ONLY for FF7 battle cursor/battle swirl",IDC_STATIC,163,
30,137,9,SS_CENTERIMAGE
LTEXT "Speed up in nasty frame upload situations",IDC_STATIC,
163,45,137,9,SS_CENTERIMAGE
LTEXT "Fixes black screens in Lunar",IDC_STATIC,162,60,123,9,
SS_CENTERIMAGE
LTEXT "Speed freaks, Killer Loop",IDC_STATIC,162,75,90,9,
SS_CENTERIMAGE
LTEXT "Old coord compatibility mode",IDC_STATIC,162,89,99,9,
SS_CENTERIMAGE
LTEXT "Leg. o. Dragoon, Alpha Multipass needed",IDC_STATIC,162,
105,136,9,SS_CENTERIMAGE
LTEXT "Faster FB access on some systems/ATI",IDC_STATIC,162,
120,125,9,SS_CENTERIMAGE
LTEXT "Better fps limitation with some games",IDC_STATIC,162,
135,117,9,SS_CENTERIMAGE
LTEXT "Skips only every second frame",IDC_STATIC,162,150,130,9,
SS_CENTERIMAGE
LTEXT "ONLY for FF9 battle mode... yellow rect",IDC_STATIC,162,
165,132,9,SS_CENTERIMAGE
LTEXT "Needed by some (buggy) OpenGL ICDs",IDC_STATIC,162,180,
132,9,SS_CENTERIMAGE
LTEXT "DW7 fix (not 100% perfect...)",IDC_STATIC,162,195,132,9,
SS_CENTERIMAGE
LTEXT "Needed with epsxe 1.5.2 and older",IDC_STATIC,162,210,
138,9,SS_CENTERIMAGE
LTEXT "Shows the full area in Capcom 2D fighters",IDC_STATIC,
162,225,138,9,SS_CENTERIMAGE
CONTROL "0x04000: Use old texture filtering",IDC_FIX15,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,240,141,10
LTEXT "Fixes black areas with some cards",IDC_STATIC,162,240,
138,9,SS_CENTERIMAGE
CONTROL "0x08000: Special upload detection",IDC_FIX16,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,255,146,10
LTEXT "May show some additional splash screens",
IDC_F14_STATIC3,163,255,137,9,SS_CENTERIMAGE
CONTROL "0x10000: Use low-res fps timer",IDC_FIX17,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,270,147,10
LTEXT "For buggy motherboard chipsets",IDC_F14_STATIC4,163,270,
137,9,SS_CENTERIMAGE
CONTROL "0x20000: Fake 'gpu busy' states",IDC_FIX18,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,11,285,147,10
LTEXT "Toggles busy flags after drawing",IDC_F14_STATIC5,163,
285,137,9,SS_CENTERIMAGE
END
IDD_KEYS DIALOG DISCARDABLE 0, 0, 186, 162
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
CAPTION "GPU key configuration"
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Default keys",IDC_DEFAULT,107,6,61,13
COMBOBOX IDC_KEY1,108,25,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_KEY2,108,41,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_KEY3,108,57,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_KEY4,108,73,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_KEY5,108,89,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_KEY6,108,105,61,62,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
DEFPUSHBUTTON "OK",IDOK,19,142,50,14
PUSHBUTTON "Cancel",IDCANCEL,115,142,50,14
RTEXT "Show/hide gpu menu:",IDC_STATIC,4,26,100,9,
SS_CENTERIMAGE
RTEXT "Show/hide gpu infos:",IDC_STATIC,4,42,100,9,
SS_CENTERIMAGE
RTEXT "Toggle selected option up:",IDC_STATIC,4,58,100,9,
SS_CENTERIMAGE
RTEXT "Toggle selected option down:",IDC_STATIC,4,74,100,9,
SS_CENTERIMAGE
RTEXT "Select previous option:",IDC_STATIC,4,90,100,9,
SS_CENTERIMAGE
RTEXT "Select next option:",IDC_STATIC,4,106,100,9,
SS_CENTERIMAGE
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_DIALOG_ABOUT, DIALOG
BEGIN
LEFTMARGIN, 2
RIGHTMARGIN, 253
TOPMARGIN, 3
BOTTOMMARGIN, 159
END
IDD_CFGDLG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 406
TOPMARGIN, 7
BOTTOMMARGIN, 288
END
IDD_FIXES, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 309
TOPMARGIN, 7
BOTTOMMARGIN, 315
END
IDD_KEYS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 155
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog Info
//
#ifdef _MSC_VER
IDD_CFGDLG DLGINIT
BEGIN
IDC_RESOLUTION, 0x403, 1, 0
"\000"
IDC_COLORDEPTH, 0x403, 7, 0
0x3631, 0x4220, 0x7469, "\000"
IDC_COLORDEPTH, 0x403, 7, 0
0x3233, 0x4220, 0x7469, "\000"
IDC_TEXQUALITY, 0x403, 11, 0
0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
IDC_TEXQUALITY, 0x403, 12, 0
0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
IDC_TEXQUALITY, 0x403, 12, 0
0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
IDC_TEXQUALITY, 0x403, 12, 0
0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
IDC_FILTERTYPE, 0x403, 9, 0
0x7453, 0x6e61, 0x6164, 0x6472, "\000"
IDC_FILTERTYPE, 0x403, 9, 0
0x7845, 0x6574, 0x646e, 0x6465, "\000"
IDC_FILTERTYPE, 0x403, 22, 0
0x7453, 0x6e61, 0x6164, 0x6472, 0x2820, 0x6f6e, 0x5320, 0x7270, 0x7469,
0x7365, 0x0029,
IDC_FILTERTYPE, 0x403, 22, 0
0x7845, 0x6574, 0x646e, 0x6465, 0x2820, 0x6f6e, 0x5320, 0x7270, 0x7469,
0x7365, 0x0029,
IDC_HIRESTEX, 0x403, 11, 0
0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
IDC_HIRESTEX, 0x403, 12, 0
0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
IDC_HIRESTEX, 0x403, 12, 0
0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
IDC_HIRESTEX, 0x403, 12, 0
0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
IDC_OFFSCREEN, 0x403, 11, 0
0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
IDC_OFFSCREEN, 0x403, 12, 0
0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
IDC_OFFSCREEN, 0x403, 12, 0
0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
IDC_OFFSCREEN, 0x403, 12, 0
0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
IDC_FRAMETEX, 0x403, 11, 0
0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
IDC_FRAMETEX, 0x403, 12, 0
0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
IDC_FRAMETEX, 0x403, 12, 0
0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
IDC_FRAMETEX, 0x403, 12, 0
0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
IDC_FRAMEREAD, 0x403, 11, 0
0x6f64, 0x276e, 0x2074, 0x6163, 0x6572, "\000"
IDC_FRAMEREAD, 0x403, 12, 0
0x3452, 0x4720, 0x2034, 0x3442, 0x4120, 0x0034,
IDC_FRAMEREAD, 0x403, 12, 0
0x3552, 0x4720, 0x2035, 0x3542, 0x4120, 0x0031,
IDC_FRAMEREAD, 0x403, 12, 0
0x3852, 0x4720, 0x2038, 0x3842, 0x4120, 0x0038,
0
END
#endif
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_INFO0 "FL - Frame limitation:\n[Off] - Speed as fast as possible\n[On-1] - Limits speed to manual value\n[On-2] - Limits speed to auto-detected value."
IDS_INFO1 "FS - Frame skipping:\n[Off] - No frames get skipped\n[On] - Tries to speed up the game by skipping frames. Can cause glitches!"
IDS_INFO2 "OD - Offscreen drawing:\n[0-4] - The higher the mode, the more checks for uploading screen data/software drawing will be done. Setting depends on the game."
IDS_INFO3 "FI - Texture filtering:\n[0-6] - Filtering will cause glitches! Mode 2/4/6: black borders vanish. Mode 3/4 will not filter sprites. Mode 5/6 will smooth sprites."
IDS_INFO4 "DI - Dithering:\n[Off] - No dithering\n[On] - Smoother shading in 16 bit modes."
IDS_INFO5 "AM - Alpha multipass:\n[Off] - Faster with some games, but opaque texture areas can get transparent.\n[On] - Accurate psx emulation."
IDS_INFO6 "AB - Advanced blending:\n[0-1] - For accurate psx coloring use mode 1. If your gfx card can't do it in hardware, a software mode will be done automatically (slower)."
IDS_INFO7 "FA - Framebuffer access:\n[0-4] - Some games read back the framebuffer to create special effects. This can be very slow! In mode 4 everything is done in software."
IDS_INFO8 "FT - Frame buffer texture:\n[0-3] - Mode 2 is trying to do some effects (whirls, motion blur) in hardware (can be slow). Mode 1 is turning the effects off (fastest emulation)."
IDS_INFO9 "GF - Special game fixes:\n[Off] - Turn off all fixes\n[On] - Turn on all activated fixes. You have to select the fixes you want to use in the gpu config."
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -0,0 +1,132 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by gpuPeopsOpenGL.rc
//
#define IDS_INFO0 1
#define IDS_INFO1 2
#define IDS_INFO2 3
#define IDC_DEFAULT 3
#define IDS_INFO3 4
#define IDS_INFO4 5
#define IDS_INFO5 6
#define IDS_INFO6 7
#define IDS_INFO7 8
#define IDS_INFO8 9
#define IDS_INFO9 10
#define IDC_DEF1 127
#define IDC_DEF2 128
#define IDD_DIALOG_ABOUT 129
#define IDD_CFGDLG 130
#define IDD_FIXES 134
#define IDB_GPU 135
#define IDD_KEYS 138
#define IDC_TEXWINDOWS 1001
#define IDC_TEXFIX 1002
#define IDC_TEXLINEAR 1003
#define IDC_RESOLUTION 1004
#define IDC_DRAWDITHER 1005
#define IDC_CACHESIZE 1006
#define IDC_BLUR 1007
#define IDC_CACHETXT 1008
#define IDC_SSAVE 1009
#define IDC_USELINES 1010
#define IDC_COLORDEPTH 1011
#define IDC_CHANGEDESK 1012
#define IDC_VSYNC 1012
#define IDC_USELIMIT 1013
#define IDC_FRAMELIMIT 1014
#define IDC_FRAMEAUTO 1015
#define IDC_FRAMEMANUELL 1016
#define IDC_ADVBLEND 1017
#define IDC_OFFSCREEN 1018
#define IDC_OPAQUE 1019
#define IDC_TEXQUALITY 1020
#define IDC_USESKIP 1021
#define IDC_DISPMODE1 1022
#define IDC_DISPMODE2 1023
#define IDC_SUBCACHE 1024
#define IDC_VRAMSIZE 1025
#define IDC_WINDOWFREE 1026
#define IDC_EXTCOLCHECK 1027
#define IDC_FRAMETEX 1028
#define IDC_WINDOWAUTO 1029
#define IDC_USETEXPRIO 1030
#define IDC_SHOWFPS 1031
#define IDC_WINX 1032
#define IDC_WINY 1033
#define IDC_FILTERTYPE 1034
#define IDC_USEANTIALIAS 1035
#define IDC_SCANBLEND 1036
#define IDC_3DGLASSES 1037
#define IDC_USESCANLINES 1038
#define IDC_KEY1 1039
#define IDC_KEY2 1040
#define IDC_KEY3 1041
#define IDC_KEY4 1042
#define IDC_KEY5 1043
#define IDC_KEY6 1044
#define IDC_USEMASK 1045
#define IDC_FASTMDEC 1046
#define IDC_FULLVRAM 1047
#define IDC_FRAMEREAD 1048
#define IDC_ARATIO 1049
#define IDC_CLIPBOARD 1050
#define IDC_CLPEDIT 1051
#define IDC_QUALTXT 1052
#define IDC_QUALTXT2 1053
#define IDC_QUALTXT3 1054
#define IDC_GARBAGE 1055
#define IDC_PALTEXWND 1056
#define IDC_HIRESTEX 1057
#define IDC_GAMEFIX 1058
#define IDC_SELFIX 1059
#define IDC_KEYCONFIG 1060
#define IDC_T14_STATIC2 1061
#define IDC_FASTMDEC2 1062
#define IDC_QUALTXT4 1063
#define IDC_F14_STATIC3 1083
#define IDC_F14_STATIC4 1084
#define IDC_F14_STATIC5 1085
#define IDC_FIX1 2038
#define IDC_FIX2 2039
#define IDC_FIX3 2040
#define IDC_FIX4 2041
#define IDC_FIX5 2042
#define IDC_FIX6 2043
#define IDC_FIX7 2044
#define IDC_FIX8 2045
#define IDC_FIX9 2046
#define IDC_FIX10 2047
#define IDC_FIX11 2048
#define IDC_FIX12 2049
#define IDC_FIX13 2050
#define IDC_FIX14 2051
#define IDC_FIX15 2052
#define IDC_FIX16 2053
#define IDC_FIX17 2054
#define IDC_FIX18 2055
#define IDC_FIX19 2056
#define IDC_FIX20 2057
#define IDC_FIX21 2058
#define IDC_FIX22 2059
#define IDC_FIX23 2060
#define IDC_FIX24 2061
#define IDC_FIX25 2062
#define IDC_FIX26 2063
#define IDC_FIX27 2064
#define IDC_FIX28 2065
#define IDC_FIX29 2066
#define IDC_FIX30 2067
#define IDC_FIX31 2068
#define IDC_FIX32 2069
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 140
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 2070
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,641 @@
/***************************************************************************
fps.c - description
-------------------
begin : Sun Mar 08 2009
copyright : (C) 1999-2009 by Pete Bernert
web : www.pbernert.com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. See also the license.txt file for *
* additional informations. *
* *
***************************************************************************/
//*************************************************************************//
// History of changes:
//
// 2009/03/08 - Pete
// - generic cleanup for the Peops release
//
//*************************************************************************//
#include "stdafx.h"
#define _IN_FPS
#include "externals.h"
////////////////////////////////////////////////////////////////////////
// FPS stuff
////////////////////////////////////////////////////////////////////////
BOOL bIsPerformanceCounter=FALSE;
float fFrameRateHz=0;
DWORD dwFrameRateTicks=16;
float fFrameRate;
int iFrameLimit;
BOOL bUseFrameLimit=FALSE;
BOOL bUseFrameSkip=0;
DWORD dwLaceCnt=0;
LARGE_INTEGER liCPUFrequency;
////////////////////////////////////////////////////////////////////////
// FPS skipping / limit
////////////////////////////////////////////////////////////////////////
BOOL bInitCap = TRUE;
float fps_skip = 0;
float fps_cur = 0;
void FrameCap (void)
{
static DWORD curticks, lastticks, _ticks_since_last_update;
static DWORD TicksToWait = 0;
static LARGE_INTEGER CurrentTime;
static LARGE_INTEGER LastTime;
static BOOL SkipNextWait = FALSE;
BOOL Waiting = TRUE;
//---------------------------------------------------------
// init some static vars...
// bInitCap is TRUE on startup and everytime the user
// is toggling the frame limit
//---------------------------------------------------------
if(bInitCap)
{
bInitCap=FALSE;
if (bIsPerformanceCounter)
QueryPerformanceCounter(&LastTime);
lastticks = timeGetTime();
TicksToWait=0;
return;
}
//---------------------------------------------------------
if(bIsPerformanceCounter)
{
QueryPerformanceCounter(&CurrentTime);
_ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
//---------------------------------------------------------
// check if diff > 1/2 sec, if yes: take mm timer value
//---------------------------------------------------------
curticks = timeGetTime();
if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
{
if(curticks < lastticks)
_ticks_since_last_update = dwFrameRateTicks+TicksToWait+1;
else _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
}
//---------------------------------------------------------
if ((_ticks_since_last_update > TicksToWait) ||
(CurrentTime.LowPart < LastTime.LowPart))
{
LastTime.HighPart = CurrentTime.HighPart;
LastTime.LowPart = CurrentTime.LowPart;
lastticks=curticks;
if((_ticks_since_last_update-TicksToWait) > dwFrameRateTicks)
TicksToWait=0;
else TicksToWait=dwFrameRateTicks-(_ticks_since_last_update-TicksToWait);
}
else
{
while (Waiting)
{
QueryPerformanceCounter(&CurrentTime);
_ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
//---------------------------------------------------------
// check if diff > 1/2 sec, if yes: take mm timer value
//---------------------------------------------------------
curticks = timeGetTime();
if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
{
if(curticks < lastticks)
_ticks_since_last_update = TicksToWait+1;
else _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
}
//---------------------------------------------------------
if ((_ticks_since_last_update > TicksToWait) ||
(CurrentTime.LowPart < LastTime.LowPart))
{
Waiting = FALSE;
lastticks=curticks;
LastTime.HighPart = CurrentTime.HighPart;
LastTime.LowPart = CurrentTime.LowPart;
TicksToWait = dwFrameRateTicks;
}
}
}
}
else
{
curticks = timeGetTime();
_ticks_since_last_update = curticks - lastticks;
if ((_ticks_since_last_update > TicksToWait) ||
(curticks < lastticks))
{
lastticks = curticks;
if((_ticks_since_last_update-TicksToWait) > dwFrameRateTicks)
TicksToWait=0;
else TicksToWait=dwFrameRateTicks-(_ticks_since_last_update-TicksToWait);
}
else
{
while (Waiting)
{
curticks = timeGetTime();
_ticks_since_last_update = curticks - lastticks;
if ((_ticks_since_last_update > TicksToWait) ||
(curticks < lastticks))
{
Waiting = FALSE;
lastticks = curticks;
TicksToWait = dwFrameRateTicks;
}
}
}
}
}
////////////////////////////////////////////////////////////////////////
#define MAXSKIP 120
#define MAXLACE 16
void FrameSkip(void)
{
static int iNumSkips=0,iAdditionalSkip=0; // number of additional frames to skip
static DWORD dwLastLace=0; // helper var for frame limitation
static DWORD curticks, lastticks, _ticks_since_last_update;
static LARGE_INTEGER CurrentTime;
static LARGE_INTEGER LastTime;
if(!dwLaceCnt) return; // important: if no updatelace happened, we ignore it completely
if(iNumSkips) // we are in skipping mode?
{
dwLastLace+=dwLaceCnt; // -> calc frame limit helper (number of laces)
bSkipNextFrame = TRUE; // -> we skip next frame
iNumSkips--; // -> ok, one done
}
else // ok, no additional skipping has to be done...
{ // we check now, if some limitation is needed, or a new skipping has to get started
DWORD dwWaitTime;
if(bInitCap || bSkipNextFrame) // first time or we skipped before?
{
if(bUseFrameLimit && !bInitCap) // frame limit wanted and not first time called?
{
DWORD dwT=_ticks_since_last_update; // -> that's the time of the last drawn frame
dwLastLace+=dwLaceCnt; // -> and that's the number of updatelace since the start of the last drawn frame
if(bIsPerformanceCounter) // -> now we calc the time of the last drawn frame + the time we spent skipping
{
QueryPerformanceCounter(&CurrentTime);
_ticks_since_last_update= dwT+CurrentTime.LowPart - LastTime.LowPart;
}
else
{
curticks = timeGetTime();
_ticks_since_last_update= dwT+curticks - lastticks;
}
dwWaitTime=dwLastLace*dwFrameRateTicks; // -> and now we calc the time the real psx would have needed
if(_ticks_since_last_update<dwWaitTime) // -> we were too fast?
{
if((dwWaitTime-_ticks_since_last_update)> // -> some more security, to prevent
(60*dwFrameRateTicks)) // wrong waiting times
_ticks_since_last_update=dwWaitTime;
while(_ticks_since_last_update<dwWaitTime) // -> loop until we have reached the real psx time
{ // (that's the additional limitation, yup)
if(bIsPerformanceCounter)
{
QueryPerformanceCounter(&CurrentTime);
_ticks_since_last_update = dwT+CurrentTime.LowPart - LastTime.LowPart;
}
else
{
curticks = timeGetTime();
_ticks_since_last_update = dwT+curticks - lastticks;
}
}
}
else // we were still too slow ?!!?
{
if(iAdditionalSkip<MAXSKIP) // -> well, somewhen we really have to stop skipping on very slow systems
{
iAdditionalSkip++; // -> inc our watchdog var
dwLaceCnt=0; // -> reset lace count
if(bIsPerformanceCounter) // -> ok, start time of the next frame
QueryPerformanceCounter(&LastTime);
lastticks = timeGetTime();
return; // -> done, we will skip next frame to get more speed
}
}
}
bInitCap=FALSE; // -> ok, we have inited the frameskip func
iAdditionalSkip=0; // -> init additional skip
bSkipNextFrame=FALSE; // -> we don't skip the next frame
if(bIsPerformanceCounter) // -> we store the start time of the next frame
QueryPerformanceCounter(&LastTime);
lastticks = timeGetTime();
dwLaceCnt=0; // -> and we start to count the laces
dwLastLace=0;
_ticks_since_last_update=0;
return; // -> done, the next frame will get drawn
}
bSkipNextFrame=FALSE; // init the frame skip signal to 'no skipping' first
if(bIsPerformanceCounter) // get the current time (we are now at the end of one drawn frame)
{
QueryPerformanceCounter(&CurrentTime);
_ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
}
else
{
curticks = timeGetTime();
_ticks_since_last_update = curticks - lastticks;
}
dwLastLace=dwLaceCnt; // store curr count (frame limitation helper)
dwWaitTime=dwLaceCnt*dwFrameRateTicks; // calc the 'real psx lace time'
if(_ticks_since_last_update>dwWaitTime) // hey, we needed way too long for that frame...
{
if(bUseFrameLimit) // if limitation, we skip just next frame,
{ // and decide after, if we need to do more
iNumSkips=0;
}
else
{
iNumSkips=_ticks_since_last_update/dwWaitTime; // -> calc number of frames to skip to catch up
iNumSkips--; // -> since we already skip next frame, one down
if(iNumSkips>MAXSKIP) iNumSkips=MAXSKIP; // -> well, somewhere we have to draw a line
}
bSkipNextFrame = TRUE; // -> signal for skipping the next frame
}
else // we were faster than real psx? fine :)
if(bUseFrameLimit) // frame limit used? so we wait til the 'real psx time' has been reached
{
if(dwLaceCnt>MAXLACE) // -> security check
_ticks_since_last_update=dwWaitTime;
while(_ticks_since_last_update<dwWaitTime) // just do a waiting loop...
{
if(bIsPerformanceCounter)
{
QueryPerformanceCounter(&CurrentTime);
_ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
}
else
{
curticks = timeGetTime();
_ticks_since_last_update = curticks - lastticks;
}
}
}
if(bIsPerformanceCounter) // ok, start time of the next frame
QueryPerformanceCounter(&LastTime);
lastticks = timeGetTime();
}
dwLaceCnt=0; // init lace counter
}
////////////////////////////////////////////////////////////////////////
void calcfps(void)
{
static DWORD curticks,_ticks_since_last_update,lastticks;
static long fps_cnt = 0;
static DWORD fps_tck = 1;
static LARGE_INTEGER CurrentTime;
static LARGE_INTEGER LastTime;
static long fpsskip_cnt = 0;
static DWORD fpsskip_tck = 1;
if(bIsPerformanceCounter)
{
QueryPerformanceCounter(&CurrentTime);
_ticks_since_last_update=CurrentTime.LowPart-LastTime.LowPart;
//--------------------------------------------------//
curticks = timeGetTime();
if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
_ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
lastticks=curticks;
//--------------------------------------------------//
if(bUseFrameSkip && !bUseFrameLimit && _ticks_since_last_update)
fps_skip=min(fps_skip,(((float)liCPUFrequency.LowPart) / ((float)_ticks_since_last_update) +1.0f));
LastTime.HighPart = CurrentTime.HighPart;
LastTime.LowPart = CurrentTime.LowPart;
}
else
{
curticks = timeGetTime();
_ticks_since_last_update=curticks-lastticks;
if(bUseFrameSkip && !bUseFrameLimit && _ticks_since_last_update)
fps_skip=min(fps_skip,((float)1000/(float)_ticks_since_last_update+1.0f));
lastticks = curticks;
}
if(bUseFrameSkip && bUseFrameLimit)
{
fpsskip_tck += _ticks_since_last_update;
if(++fpsskip_cnt==2)
{
if(bIsPerformanceCounter)
fps_skip = ((float)liCPUFrequency.LowPart) / ((float)fpsskip_tck) *2.0f;
else
fps_skip = (float)2000/(float)fpsskip_tck;
fps_skip +=6.0f;
fpsskip_cnt = 0;
fpsskip_tck = 1;
}
}
fps_tck += _ticks_since_last_update;
if(++fps_cnt==10)
{
if(bIsPerformanceCounter)
fps_cur = ((float)liCPUFrequency.LowPart) / ((float)fps_tck) *10.0f;
else
fps_cur = (float)10000/(float)fps_tck;
fps_cnt = 0;
fps_tck = 1;
if(bUseFrameLimit && fps_cur>fFrameRateHz) // optical adjust ;) avoids flickering fps display
fps_cur=fFrameRateHz;
}
}
////////////////////////////////////////////////////////////////////////
// PC FPS skipping / limit
////////////////////////////////////////////////////////////////////////
void PCFrameCap(void)
{
static DWORD curticks, lastticks, _ticks_since_last_update;
static DWORD TicksToWait = 0;
static LARGE_INTEGER CurrentTime;
static LARGE_INTEGER LastTime;
BOOL Waiting = TRUE;
while (Waiting)
{
if(bIsPerformanceCounter)
{
QueryPerformanceCounter(&CurrentTime);
_ticks_since_last_update = CurrentTime.LowPart - LastTime.LowPart;
//------------------------------------------------//
curticks = timeGetTime();
if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
{
if(curticks < lastticks)
_ticks_since_last_update = TicksToWait+1;
else _ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
}
//------------------------------------------------//
if ((_ticks_since_last_update > TicksToWait) ||
(CurrentTime.LowPart < LastTime.LowPart))
{
Waiting = FALSE;
lastticks=curticks;
LastTime.HighPart = CurrentTime.HighPart;
LastTime.LowPart = CurrentTime.LowPart;
TicksToWait = (liCPUFrequency.LowPart / fFrameRateHz);
}
}
else
{
curticks = timeGetTime();
_ticks_since_last_update = curticks - lastticks;
if ((_ticks_since_last_update > TicksToWait) ||
(curticks < lastticks))
{
Waiting = FALSE;
lastticks = curticks;
TicksToWait = (1000 / (DWORD)fFrameRateHz);
}
}
}
}
////////////////////////////////////////////////////////////////////////
void PCcalcfps(void)
{
static DWORD curticks,_ticks_since_last_update,lastticks;
static long fps_cnt = 0;
static float fps_acc = 0;
static LARGE_INTEGER CurrentTime;
static LARGE_INTEGER LastTime;
float CurrentFPS=0;
if(bIsPerformanceCounter)
{
QueryPerformanceCounter(&CurrentTime);
_ticks_since_last_update=CurrentTime.LowPart-LastTime.LowPart;
//--------------------------------------------------//
curticks = timeGetTime();
if(_ticks_since_last_update>(liCPUFrequency.LowPart>>1))
_ticks_since_last_update = (liCPUFrequency.LowPart * (curticks - lastticks))/1000;
lastticks=curticks;
//--------------------------------------------------//
if(_ticks_since_last_update)
{
CurrentFPS = ((float)liCPUFrequency.LowPart) / ((float)_ticks_since_last_update);
}
else CurrentFPS = 0;
LastTime.HighPart = CurrentTime.HighPart;
LastTime.LowPart = CurrentTime.LowPart;
}
else
{
curticks = timeGetTime();
if(_ticks_since_last_update=curticks-lastticks)
CurrentFPS=(float)1000/(float)_ticks_since_last_update;
else CurrentFPS = 0;
lastticks = curticks;
}
fps_acc += CurrentFPS;
if(++fps_cnt==10)
{
fps_cur = fps_acc / 10;
fps_acc = 0;
fps_cnt = 0;
}
fps_skip=CurrentFPS+1.0f;
}
////////////////////////////////////////////////////////////////////////
void SetAutoFrameCap(void)
{
if(iFrameLimit==1)
{
fFrameRateHz = fFrameRate;
if(bIsPerformanceCounter)
dwFrameRateTicks=(liCPUFrequency.LowPart / fFrameRateHz);
else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz);
return;
}
if(dwActFixes&128)
{
if (PSXDisplay.Interlaced)
fFrameRateHz = PSXDisplay.PAL?50.0f:60.0f;
else fFrameRateHz = PSXDisplay.PAL?25.0f:30.0f;
}
else
{
//fFrameRateHz = PSXDisplay.PAL?50.0f:59.94f;
if(PSXDisplay.PAL)
{
if (STATUSREG&GPUSTATUS_INTERLACED)
fFrameRateHz=33868800.0f/677343.75f; // 50.00238
else fFrameRateHz=33868800.0f/680595.00f; // 49.76351
}
else
{
if (STATUSREG&GPUSTATUS_INTERLACED)
fFrameRateHz=33868800.0f/565031.25f; // 59.94146
else fFrameRateHz=33868800.0f/566107.50f; // 59.82750
}
if(bIsPerformanceCounter)
dwFrameRateTicks=(liCPUFrequency.LowPart / fFrameRateHz);
else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz);
}
}
////////////////////////////////////////////////////////////////////////
void InitFrameCap(void) // inits cpu frequency info (on gpu startup)
{
if (QueryPerformanceFrequency (&liCPUFrequency))
bIsPerformanceCounter = TRUE;
else bIsPerformanceCounter = FALSE;
}
////////////////////////////////////////////////////////////////////////
void ReInitFrameCap(void)
{
BOOL bOldPerformanceCounter=bIsPerformanceCounter; // store curr timer mode
if(dwActFixes&0x10000) // check game fix... high performance counters are bad on some mb chipsets
bIsPerformanceCounter=FALSE;
else
{
if (QueryPerformanceFrequency (&liCPUFrequency))
bIsPerformanceCounter = TRUE;
else bIsPerformanceCounter = FALSE;
}
if(bOldPerformanceCounter!=bIsPerformanceCounter) // changed?
{
bInitCap = TRUE;
SetAutoFrameCap();
}
}
////////////////////////////////////////////////////////////////////////
void SetFrameRateConfig(void)
{
if(fFrameRateHz==0)
{
if(iFrameLimit==2) fFrameRateHz=59.94f; // auto framerate? set some init val (no pal/ntsc known yet)
else fFrameRateHz=fFrameRate; // else set user framerate
}
if(bIsPerformanceCounter)
dwFrameRateTicks=(liCPUFrequency.LowPart / fFrameRateHz);
else dwFrameRateTicks=(1000 / (DWORD)fFrameRateHz);
}
void CheckFrameRate(void) // called in updatelace (on every emulated psx vsync)
{
if(bUseFrameSkip)
{
if(!(dwActFixes&0x100))
{
dwLaceCnt++; // -> and store cnt of vsync between frames
if(dwLaceCnt>=MAXLACE && bUseFrameLimit)
{
if(dwLaceCnt==MAXLACE) bInitCap=TRUE;
FrameCap();
}
}
else if(bUseFrameLimit) FrameCap();
calcfps(); // -> calc fps display in skipping mode
}
else // -> non-skipping mode:
{
if(bUseFrameLimit) FrameCap();
if(ulKeybits&KEY_SHOWFPS) calcfps();
}
}
////////////////////////////////////////////////////////////////////////
void CALLBACK GPUsetframelimit(unsigned long option) // new EPSXE interface func: main emu can enable/disable fps limitation this way
{
bInitCap = TRUE;
if(option==1) // emu says: limit
{
bUseFrameLimit=TRUE;bUseFrameSkip=FALSE;iFrameLimit=2;
SetAutoFrameCap();
}
else // emu says: no limit
{
bUseFrameLimit=FALSE;
}
}
////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,203 @@
/***************************************************************************
key.c - description
-------------------
begin : Sun Mar 08 2009
copyright : (C) 1999-2009 by Pete Bernert
web : www.pbernert.com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. See also the license.txt file for *
* additional informations. *
* *
***************************************************************************/
//*************************************************************************//
// History of changes:
//
// 2009/03/08 - Pete
// - generic cleanup for the Peops release
//
//*************************************************************************//
#include "stdafx.h"
#define _IN_KEY
#include "externals.h"
#include "menu.h"
#include "texture.h"
#include "draw.h"
#include "fps.h"
////////////////////////////////////////////////////////////////////////
// KeyBoard handler stuff
////////////////////////////////////////////////////////////////////////
uint32_t ulKeybits;
static WNDPROC pOldWinProc=0;
char szGPUKeys[7];
////////////////////////////////////////////////////////////////////////
// keyboard handler (WINDOWS)
////////////////////////////////////////////////////////////////////////
LRESULT CALLBACK key_winproc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
{
switch(message)
{
case WM_SYSCOMMAND:
if(iNoScreenSaver && wParam==SC_SCREENSAVE) return 0L;
break;
case WM_KEYDOWN:
if(wParam==(WPARAM)szGPUKeys[1]) {ulKeybits|=KEY_RESETTEXSTORE;break;}
break;
case WM_SYSKEYUP:
if(wParam==VK_RETURN) bChangeWinMode=TRUE;
break;
case WM_KEYUP:
if(wParam==(WPARAM)szGPUKeys[0])
{
if(ulKeybits&KEY_SHOWFPS)
{
ulKeybits&=~KEY_SHOWFPS;
HideText();
DestroyPic();
}
else
{
ulKeybits|=KEY_SHOWFPS;
szDispBuf[0]=0;
BuildDispMenu(0);
}
break;
}
if(wParam==(WPARAM)szGPUKeys[1]) {ShowGpuPic();break;}
if(wParam==(WPARAM)szGPUKeys[2]) {SwitchDispMenu(-1); break;}
if(wParam==(WPARAM)szGPUKeys[3]) {SwitchDispMenu( 1); break;}
if(wParam==(WPARAM)szGPUKeys[4])
{
if(GetAsyncKeyState(VK_SHIFT)&32768)
{
if(iBlurBuffer) iBlurBuffer=0;
else iBlurBuffer=1;
}
BuildDispMenu(-1);
break;
}
if(wParam==(WPARAM)szGPUKeys[5]) {BuildDispMenu( 1); break;}
}
return pOldWinProc( hwnd, message, wParam, lParam );
}
////////////////////////////////////////////////////////////////////////
void InitKeyHandler(void)
{
if(!pOldWinProc)
{
pOldWinProc = (WNDPROC)GetWindowLong(hWWindow, GWL_WNDPROC );
SetWindowLong(hWWindow, GWL_WNDPROC, (long)key_winproc);
}
}
////////////////////////////////////////////////////////////////////////
void ExitKeyHandler(void)
{
if(pOldWinProc)
SetWindowLong(hWWindow,GWL_WNDPROC, // set old proc
(long)pOldWinProc);
pOldWinProc = 0;
}
////////////////////////////////////////////////////////////////////////
// reset stuff on special keyboard commands
////////////////////////////////////////////////////////////////////////
void ResetStuff(void)
{
ResetTextureArea(TRUE);
ulKeybits&=~KEY_RESETTEXSTORE;
if(ulKeybits&KEY_BLACKWHITE)
{
if(bUseFixes) {bUseFixes=FALSE;dwActFixes=0;}
else {bUseFixes=TRUE; dwActFixes=dwCfgFixes;}
SetExtGLFuncs();
if(iFrameLimit==2) SetAutoFrameCap();
ulKeybits&=~KEY_BLACKWHITE;
}
if(ulKeybits&KEY_RESETFILTER)
{
if(ulKeybits&KEY_STEPDOWN)
iFilterType--;
else iFilterType++;
if(iFilterType>6) iFilterType=0;
if(iFilterType<0) iFilterType=6;
SetExtGLFuncs();
ulKeybits&=~(KEY_RESETFILTER|KEY_STEPDOWN);
BuildDispMenu(0);
}
if(ulKeybits&KEY_RESETOPAQUE)
{
bOpaquePass=!bOpaquePass;
SetExtGLFuncs();
ulKeybits&=~KEY_RESETOPAQUE;
BuildDispMenu(0);
}
if(ulKeybits&KEY_RESETADVBLEND)
{
bAdvancedBlend=!bAdvancedBlend;
SetExtGLFuncs();
ulKeybits&=~KEY_RESETADVBLEND;
BuildDispMenu(0);
}
if(ulKeybits&KEY_RESETDITHER)
{
bDrawDither=!bDrawDither;
if(bDrawDither) glEnable(GL_DITHER);
else glDisable(GL_DITHER);
ulKeybits&=~KEY_RESETDITHER;
BuildDispMenu(0);
}
if(ulKeybits & KEY_TOGGLEFBTEXTURE)
{
if(ulKeybits&KEY_STEPDOWN)
iFrameTexType--;
else iFrameTexType++;
if(iFrameTexType>3) iFrameTexType=0;
if(iFrameTexType<0) iFrameTexType=3;
if(gTexFrameName!=0)
glDeleteTextures(1, &gTexFrameName);
gTexFrameName=0;
ulKeybits&=~(KEY_TOGGLEFBTEXTURE|KEY_STEPDOWN);
}
if(ulKeybits & KEY_TOGGLEFBREAD)
{
if(ulKeybits&KEY_STEPDOWN)
iFrameReadType--;
else iFrameReadType++;
if(iFrameReadType>4) iFrameReadType=0;
if(iFrameReadType<0) iFrameReadType=4;
if(iFrameReadType==4) bFullVRam=TRUE;
else bFullVRam=FALSE;
iRenderFVR=0;
ulKeybits&=~(KEY_TOGGLEFBREAD|KEY_STEPDOWN);
}
}

View File

@ -0,0 +1,65 @@
/***************************************************************************
ssave.c - description
-------------------
begin : Sun Mar 08 2009
copyright : (C) 1999-2009 by Pete Bernert
web : www.pbernert.com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. See also the license.txt file for *
* additional informations. *
* *
***************************************************************************/
//*************************************************************************//
// History of changes:
//
// 2009/03/08 - Pete
// - generic cleanup for the Peops release
//
//*************************************************************************//
#include "stdafx.h"
#include "externals.h"
////////////////////////////////////////////////////////////////////////
// screensaver stuff: dynamically load kernel32.dll to avoid export dependeny
////////////////////////////////////////////////////////////////////////
#ifdef __MINGW32__
#define EXECUTION_STATE DWORD
#endif
void EnableScreenSaver(BOOL bEnab)
{
HINSTANCE hKernel32 = NULL;
EXECUTION_STATE (WINAPI *D_SetThreadExecutionState)(EXECUTION_STATE esFlags);
if(bEnab)
{
hKernel32 = LoadLibrary("kernel32.dll");
if(hKernel32 != NULL)
{
if((D_SetThreadExecutionState=(EXECUTION_STATE (WINAPI *)(EXECUTION_STATE))GetProcAddress(hKernel32,"SetThreadExecutionState"))!=NULL)
D_SetThreadExecutionState(ES_SYSTEM_REQUIRED|ES_DISPLAY_REQUIRED);
FreeLibrary(hKernel32);
}
}
else
{
hKernel32 = LoadLibrary("kernel32.dll");
if(hKernel32 != NULL)
{
if((D_SetThreadExecutionState=(EXECUTION_STATE (WINAPI *)(EXECUTION_STATE))GetProcAddress(hKernel32,"SetThreadExecutionState"))!=NULL)
D_SetThreadExecutionState(ES_SYSTEM_REQUIRED|ES_DISPLAY_REQUIRED|ES_CONTINUOUS);
FreeLibrary(hKernel32);
}
}
}

View File

@ -0,0 +1,29 @@
/***************************************************************************
ssave.h - description
-------------------
begin : Sun Mar 08 2009
copyright : (C) 1999-2009 by Pete Bernert
web : www.pbernert.com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. See also the license.txt file for *
* additional informations. *
* *
***************************************************************************/
//*************************************************************************//
// History of changes:
//
// 2009/03/08 - Pete
// - generic cleanup for the Peops release
//
//*************************************************************************//
// prototype
void EnableScreenSaver(BOOL bEnab);

View File

@ -0,0 +1,42 @@
/***************************************************************************
gpuPeopsOpenGL.c - description
-------------------
begin : Sun Mar 08 2009
copyright : (C) 1999-2009 by Pete Bernert
web : www.pbernert.com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. See also the license.txt file for *
* additional informations. *
* *
***************************************************************************/
//*************************************************************************//
// History of changes:
//
// 2009/03/08 - Pete
// - generic cleanup for the Peops release
//
//*************************************************************************//
#include "stdafx.h"
///////////////////////////////////////////////////////////////////////////
// GENERIC FUNCS //////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
HINSTANCE hInst=NULL;
BOOL APIENTRY DllMain(HANDLE hModule, // DLL INIT
DWORD dwReason,
LPVOID lpReserved)
{
hInst=(HINSTANCE)hModule;
return TRUE; // very quick :)
}