Import latest win32-dev changes
OpengGL support full unicode support x64 build support shader support (D3D+OGL) DDraw: vsync, dynamic buffer allocation restored SPC save option better window position saving fixed crash during fullscreen switch
This commit is contained in:
parent
e23dbf548d
commit
d0b9becaab
@ -217,17 +217,17 @@ struct AVIFile
|
|||||||
long tBytes, ByteBuffer;
|
long tBytes, ByteBuffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
static char saved_cur_avi_fnameandext[MAX_PATH];
|
static TCHAR saved_cur_avi_fnameandext[MAX_PATH];
|
||||||
static char saved_avi_fname[MAX_PATH];
|
static TCHAR saved_avi_fname[MAX_PATH];
|
||||||
static char saved_avi_ext[MAX_PATH];
|
static TCHAR saved_avi_ext[MAX_PATH];
|
||||||
static int avi_segnum=0;
|
static int avi_segnum=0;
|
||||||
static struct AVIFile saved_avi_info;
|
static struct AVIFile saved_avi_info;
|
||||||
static int use_prev_options=0;
|
static int use_prev_options=0;
|
||||||
|
|
||||||
static bool truncate_existing(const char* filename)
|
static bool truncate_existing(const TCHAR* filename)
|
||||||
{
|
{
|
||||||
// this is only here because AVIFileOpen doesn't seem to do it for us
|
// this is only here because AVIFileOpen doesn't seem to do it for us
|
||||||
FILE* fd = fopen(filename, "wb");
|
FILE* fd = _tfopen(filename, TEXT("wb"));
|
||||||
if(fd)
|
if(fd)
|
||||||
{
|
{
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
@ -313,7 +313,7 @@ void AVISetSoundFormat(const WAVEFORMATEX* wave_format, struct AVIFile* avi_out)
|
|||||||
avi_out->sound_added = true;
|
avi_out->sound_added = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AVIBegin(const char* filename, struct AVIFile* _avi_out)
|
int AVIBegin(const TCHAR* filename, struct AVIFile* _avi_out)
|
||||||
{
|
{
|
||||||
AVIFile& avi = *_avi_out;
|
AVIFile& avi = *_avi_out;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
@ -390,13 +390,13 @@ int AVIBegin(const char* filename, struct AVIFile* _avi_out)
|
|||||||
avi.tBytes = 0;
|
avi.tBytes = 0;
|
||||||
avi.ByteBuffer = 0;
|
avi.ByteBuffer = 0;
|
||||||
|
|
||||||
strncpy(saved_cur_avi_fnameandext,filename,MAX_PATH);
|
lstrcpyn(saved_cur_avi_fnameandext,filename,MAX_PATH);
|
||||||
strncpy(saved_avi_fname,filename,MAX_PATH);
|
lstrcpyn(saved_avi_fname,filename,MAX_PATH);
|
||||||
char* dot = strrchr(saved_avi_fname, '.');
|
TCHAR* dot = _tcsrchr(saved_avi_fname, TEXT('.'));
|
||||||
if(dot && dot > strrchr(saved_avi_fname, '/') && dot > strrchr(saved_avi_fname, '\\'))
|
if(dot && dot > _tcsrchr(saved_avi_fname, TEXT('/')) && dot > _tcsrchr(saved_avi_fname, TEXT('\\')))
|
||||||
{
|
{
|
||||||
strcpy(saved_avi_ext,dot);
|
lstrcpy(saved_avi_ext,dot);
|
||||||
dot[0]='\0';
|
dot[0]=TEXT('\0');
|
||||||
}
|
}
|
||||||
|
|
||||||
// success
|
// success
|
||||||
@ -452,17 +452,17 @@ int AVIGetSoundFormat(const struct AVIFile* avi_out, const WAVEFORMATEX** ppForm
|
|||||||
|
|
||||||
static int AVINextSegment(struct AVIFile* avi_out)
|
static int AVINextSegment(struct AVIFile* avi_out)
|
||||||
{
|
{
|
||||||
char avi_fname[MAX_PATH];
|
TCHAR avi_fname[MAX_PATH];
|
||||||
strcpy(avi_fname,saved_avi_fname);
|
lstrcpy(avi_fname,saved_avi_fname);
|
||||||
char avi_fname_temp[MAX_PATH];
|
TCHAR avi_fname_temp[MAX_PATH];
|
||||||
sprintf(avi_fname_temp, "%s_part%d%s", avi_fname, avi_segnum+2, saved_avi_ext);
|
_stprintf(avi_fname_temp, TEXT("%s_part%d%s"), avi_fname, avi_segnum+2, saved_avi_ext);
|
||||||
saved_avi_info=*avi_out;
|
saved_avi_info=*avi_out;
|
||||||
use_prev_options=1;
|
use_prev_options=1;
|
||||||
avi_segnum++;
|
avi_segnum++;
|
||||||
clean_up(avi_out);
|
clean_up(avi_out);
|
||||||
int ret = AVIBegin(avi_fname_temp, avi_out);
|
int ret = AVIBegin(avi_fname_temp, avi_out);
|
||||||
use_prev_options=0;
|
use_prev_options=0;
|
||||||
strcpy(saved_avi_fname,avi_fname);
|
lstrcpy(saved_avi_fname,avi_fname);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ void AVISetSoundFormat(const WAVEFORMATEX* wave_format, struct AVIFile* avi_out)
|
|||||||
// after setting up output options, start writing with this
|
// after setting up output options, start writing with this
|
||||||
// returns 1 if successful, 0 otherwise
|
// returns 1 if successful, 0 otherwise
|
||||||
// check the return value!
|
// check the return value!
|
||||||
int AVIBegin(const char* filename, struct AVIFile* avi_out);
|
int AVIBegin(const TCHAR* filename, struct AVIFile* avi_out);
|
||||||
|
|
||||||
// get the format in use from an already existing avi output object
|
// get the format in use from an already existing avi output object
|
||||||
// returns 1 if successful, 0 otherwise
|
// returns 1 if successful, 0 otherwise
|
||||||
|
@ -178,14 +178,13 @@
|
|||||||
#pragma comment( lib, "d3dx9" )
|
#pragma comment( lib, "d3dx9" )
|
||||||
#pragma comment( lib, "DxErr9" )
|
#pragma comment( lib, "DxErr9" )
|
||||||
|
|
||||||
#include "../snes9x.h"
|
|
||||||
|
|
||||||
#include <Dxerr.h>
|
|
||||||
#include <tchar.h>
|
|
||||||
#include "cdirect3d.h"
|
#include "cdirect3d.h"
|
||||||
#include "win32_display.h"
|
#include "win32_display.h"
|
||||||
|
#include "../snes9x.h"
|
||||||
#include "../gfx.h"
|
#include "../gfx.h"
|
||||||
|
#include "../display.h"
|
||||||
#include "wsnes9x.h"
|
#include "wsnes9x.h"
|
||||||
|
#include <Dxerr.h>
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
|
|
||||||
#include "../filter/hq2x.h"
|
#include "../filter/hq2x.h"
|
||||||
@ -212,7 +211,15 @@ CDirect3D::CDirect3D()
|
|||||||
afterRenderHeight = 0;
|
afterRenderHeight = 0;
|
||||||
quadTextureSize = 0;
|
quadTextureSize = 0;
|
||||||
fullscreen = false;
|
fullscreen = false;
|
||||||
iFilterScale = 0;
|
filterScale = 1;
|
||||||
|
for(int i = 0; i < MAX_SHADER_TEXTURES; i++) {
|
||||||
|
rubyLUT[i] = NULL;
|
||||||
|
}
|
||||||
|
effect=NULL;
|
||||||
|
shader_compiled=false;
|
||||||
|
shaderTimer = 1.0f;
|
||||||
|
shaderTimeStart = 0;
|
||||||
|
shaderTimeElapsed = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* CDirect3D::~CDirect3D()
|
/* CDirect3D::~CDirect3D()
|
||||||
@ -244,7 +251,7 @@ bool CDirect3D::Initialize(HWND hWnd)
|
|||||||
|
|
||||||
ZeroMemory(&dPresentParams, sizeof(dPresentParams));
|
ZeroMemory(&dPresentParams, sizeof(dPresentParams));
|
||||||
dPresentParams.hDeviceWindow = hWnd;
|
dPresentParams.hDeviceWindow = hWnd;
|
||||||
dPresentParams.Windowed = TRUE;
|
dPresentParams.Windowed = true;
|
||||||
dPresentParams.BackBufferCount = GUI.DoubleBuffered?2:1;
|
dPresentParams.BackBufferCount = GUI.DoubleBuffered?2:1;
|
||||||
dPresentParams.SwapEffect = D3DSWAPEFFECT_DISCARD;
|
dPresentParams.SwapEffect = D3DSWAPEFFECT_DISCARD;
|
||||||
dPresentParams.BackBufferFormat = D3DFMT_UNKNOWN;
|
dPresentParams.BackBufferFormat = D3DFMT_UNKNOWN;
|
||||||
@ -266,20 +273,12 @@ bool CDirect3D::Initialize(HWND hWnd)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//VideoMemory controls if we want bilinear filtering
|
|
||||||
if(GUI.BilinearFilter) {
|
|
||||||
pDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
|
|
||||||
pDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
|
|
||||||
} else {
|
|
||||||
pDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_POINT);
|
|
||||||
pDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_POINT);
|
|
||||||
}
|
|
||||||
|
|
||||||
pDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
|
pDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
|
||||||
|
|
||||||
init_done = true;
|
init_done = true;
|
||||||
|
|
||||||
|
ApplyDisplayChanges();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -287,6 +286,7 @@ bool CDirect3D::Initialize(HWND hWnd)
|
|||||||
void CDirect3D::DeInitialize()
|
void CDirect3D::DeInitialize()
|
||||||
{
|
{
|
||||||
DestroyDrawSurface();
|
DestroyDrawSurface();
|
||||||
|
SetShader(NULL);
|
||||||
|
|
||||||
if(vertexBuffer) {
|
if(vertexBuffer) {
|
||||||
vertexBuffer->Release();
|
vertexBuffer->Release();
|
||||||
@ -308,7 +308,117 @@ void CDirect3D::DeInitialize()
|
|||||||
afterRenderHeight = 0;
|
afterRenderHeight = 0;
|
||||||
quadTextureSize = 0;
|
quadTextureSize = 0;
|
||||||
fullscreen = false;
|
fullscreen = false;
|
||||||
iFilterScale = 0;
|
filterScale = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CDirect3D::SetShader(const TCHAR *file)
|
||||||
|
{
|
||||||
|
//MUDLORD: the guts
|
||||||
|
//Compiles a shader from files on disc
|
||||||
|
//Sets LUT textures to texture files in PNG format.
|
||||||
|
|
||||||
|
TCHAR folder[MAX_PATH];
|
||||||
|
TCHAR rubyLUTfileName[MAX_PATH];
|
||||||
|
TCHAR *slash;
|
||||||
|
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
shader_compiled = false;
|
||||||
|
shaderTimer = 1.0f;
|
||||||
|
shaderTimeStart = 0;
|
||||||
|
shaderTimeElapsed = 0;
|
||||||
|
|
||||||
|
if(effect) {
|
||||||
|
effect->Release();
|
||||||
|
effect = NULL;
|
||||||
|
}
|
||||||
|
for(int i = 0; i < MAX_SHADER_TEXTURES; i++) {
|
||||||
|
if (rubyLUT[i] != NULL) {
|
||||||
|
rubyLUT[i]->Release();
|
||||||
|
rubyLUT[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (file == NULL || *file==TEXT('\0'))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
lstrcpy(folder,file);
|
||||||
|
slash = _tcsrchr(folder,TEXT('\\'));
|
||||||
|
if(slash)
|
||||||
|
*(slash+1)=TEXT('\0');
|
||||||
|
else
|
||||||
|
*folder=TEXT('\0');
|
||||||
|
SetCurrentDirectory(S9xGetDirectoryT(DEFAULT_DIR));
|
||||||
|
|
||||||
|
for(int i = 0; i < MAX_SHADER_TEXTURES; i++) {
|
||||||
|
_stprintf(rubyLUTfileName, TEXT("%srubyLUT%d.png"), folder, i);
|
||||||
|
hr = D3DXCreateTextureFromFile(pDevice,rubyLUTfileName,&rubyLUT[i]);
|
||||||
|
if FAILED(hr){
|
||||||
|
rubyLUT[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LPD3DXBUFFER pBufferErrors = NULL;
|
||||||
|
hr = D3DXCreateEffectFromFile( pDevice,file,NULL, NULL,
|
||||||
|
D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY, NULL, &effect,
|
||||||
|
&pBufferErrors );
|
||||||
|
if( FAILED(hr) ) {
|
||||||
|
TCHAR errorMsg[MAX_PATH + 50];
|
||||||
|
_stprintf(errorMsg,TEXT("Error loading HLSL effect file:\n%s"),file);
|
||||||
|
MessageBox(NULL, errorMsg, TEXT("Shader Loading Error"),
|
||||||
|
MB_OK|MB_ICONEXCLAMATION);
|
||||||
|
if(pBufferErrors) {
|
||||||
|
LPVOID pCompilErrors = pBufferErrors->GetBufferPointer();
|
||||||
|
MessageBox(NULL, (const TCHAR*)pCompilErrors, TEXT("FX Compile Error"),
|
||||||
|
MB_OK|MB_ICONEXCLAMATION);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
D3DXHANDLE hTech;
|
||||||
|
effect->FindNextValidTechnique(NULL,&hTech);
|
||||||
|
effect->SetTechnique( hTech );
|
||||||
|
shader_compiled = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDirect3D::SetShaderVars()
|
||||||
|
{
|
||||||
|
D3DXVECTOR4 rubyTextureSize;
|
||||||
|
D3DXVECTOR4 rubyInputSize;
|
||||||
|
D3DXVECTOR4 rubyOutputSize;
|
||||||
|
D3DXHANDLE rubyTimer;
|
||||||
|
|
||||||
|
int shaderTime = GetTickCount();
|
||||||
|
shaderTimeElapsed += shaderTime - shaderTimeStart;
|
||||||
|
shaderTimeStart = shaderTime;
|
||||||
|
if(shaderTimeElapsed > 100) {
|
||||||
|
shaderTimeElapsed = 0;
|
||||||
|
shaderTimer += 0.01f;
|
||||||
|
}
|
||||||
|
rubyTextureSize.x = rubyTextureSize.y = (float)quadTextureSize;
|
||||||
|
rubyTextureSize.z = rubyTextureSize.w = 1.0 / quadTextureSize;
|
||||||
|
rubyInputSize.x = (float)afterRenderWidth;
|
||||||
|
rubyInputSize.y = (float)afterRenderHeight;
|
||||||
|
rubyInputSize.z = 1.0 / rubyInputSize.y;
|
||||||
|
rubyInputSize.w = 1.0 / rubyInputSize.z;
|
||||||
|
rubyOutputSize.x = GUI.Stretch?(float)dPresentParams.BackBufferWidth:(float)afterRenderWidth;
|
||||||
|
rubyOutputSize.y = GUI.Stretch?(float)dPresentParams.BackBufferHeight:(float)afterRenderHeight;
|
||||||
|
rubyOutputSize.z = 1.0 / rubyOutputSize.y;
|
||||||
|
rubyOutputSize.w = 1.0 / rubyOutputSize.x;
|
||||||
|
rubyTimer = effect->GetParameterByName(0, "rubyTimer");
|
||||||
|
|
||||||
|
effect->SetFloat(rubyTimer, shaderTimer);
|
||||||
|
effect->SetVector("rubyTextureSize", &rubyTextureSize);
|
||||||
|
effect->SetVector("rubyInputSize", &rubyInputSize);
|
||||||
|
effect->SetVector("rubyOutputSize", &rubyOutputSize);
|
||||||
|
|
||||||
|
effect->SetTexture("rubyTexture", drawSurface);
|
||||||
|
for(int i = 0; i < MAX_SHADER_TEXTURES; i++) {
|
||||||
|
char rubyLUTName[256];
|
||||||
|
sprintf(rubyLUTName, "rubyLUT%d", i);
|
||||||
|
if (rubyLUT[i] != NULL) {
|
||||||
|
effect->SetTexture( rubyLUTName, rubyLUT[i] );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* CDirect3D::Render
|
/* CDirect3D::Render
|
||||||
@ -321,7 +431,7 @@ void CDirect3D::Render(SSurface Src)
|
|||||||
{
|
{
|
||||||
SSurface Dst;
|
SSurface Dst;
|
||||||
RECT dstRect;
|
RECT dstRect;
|
||||||
int iNewFilterScale;
|
unsigned int newFilterScale;
|
||||||
D3DLOCKED_RECT lr;
|
D3DLOCKED_RECT lr;
|
||||||
D3DLOCKED_RECT lrConv;
|
D3DLOCKED_RECT lrConv;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
@ -330,9 +440,9 @@ void CDirect3D::Render(SSurface Src)
|
|||||||
|
|
||||||
//create a new draw surface if the filter scale changes
|
//create a new draw surface if the filter scale changes
|
||||||
//at least factor 2 so we can display unscaled hi-res images
|
//at least factor 2 so we can display unscaled hi-res images
|
||||||
iNewFilterScale = max(2,max(GetFilterScale(GUI.ScaleHiRes),GetFilterScale(GUI.Scale)));
|
newFilterScale = max(2,max(GetFilterScale(GUI.ScaleHiRes),GetFilterScale(GUI.Scale)));
|
||||||
if(iNewFilterScale!=iFilterScale) {
|
if(newFilterScale!=filterScale) {
|
||||||
ChangeDrawSurfaceSize(iNewFilterScale);
|
ChangeDrawSurfaceSize(newFilterScale);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(FAILED(hr = pDevice->TestCooperativeLevel())) {
|
if(FAILED(hr = pDevice->TestCooperativeLevel())) {
|
||||||
@ -376,13 +486,28 @@ void CDirect3D::Render(SSurface Src)
|
|||||||
|
|
||||||
if(!GUI.Stretch||GUI.AspectRatio)
|
if(!GUI.Stretch||GUI.AspectRatio)
|
||||||
pDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
|
pDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
|
||||||
|
|
||||||
pDevice->BeginScene();
|
pDevice->BeginScene();
|
||||||
|
|
||||||
pDevice->SetTexture(0, drawSurface);
|
pDevice->SetTexture(0, drawSurface);
|
||||||
pDevice->SetFVF(FVF_COORDS_TEX);
|
pDevice->SetFVF(FVF_COORDS_TEX);
|
||||||
pDevice->SetStreamSource(0,vertexBuffer,0,sizeof(VERTEX));
|
pDevice->SetStreamSource(0,vertexBuffer,0,sizeof(VERTEX));
|
||||||
pDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP,0,2);
|
|
||||||
|
if (shader_compiled) {
|
||||||
|
UINT passes;
|
||||||
|
|
||||||
|
SetShaderVars();
|
||||||
|
|
||||||
|
hr = effect->Begin(&passes, 0);
|
||||||
|
for(UINT pass = 0; pass < passes; pass++ ) {
|
||||||
|
effect->BeginPass(pass);
|
||||||
|
pDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP,0,2);
|
||||||
|
effect->EndPass();
|
||||||
|
}
|
||||||
|
effect->End();
|
||||||
|
} else {
|
||||||
|
pDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP,0,2);
|
||||||
|
}
|
||||||
|
|
||||||
pDevice->EndScene();
|
pDevice->EndScene();
|
||||||
|
|
||||||
@ -397,12 +522,12 @@ and creates a new texture
|
|||||||
*/
|
*/
|
||||||
void CDirect3D::CreateDrawSurface()
|
void CDirect3D::CreateDrawSurface()
|
||||||
{
|
{
|
||||||
int neededSize;
|
unsigned int neededSize;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
//we need at least 512 pixels (SNES_WIDTH * 2) so we can start with that value
|
//we need at least 512 pixels (SNES_WIDTH * 2) so we can start with that value
|
||||||
quadTextureSize = 512;
|
quadTextureSize = 512;
|
||||||
neededSize = SNES_WIDTH * iFilterScale;
|
neededSize = SNES_WIDTH * filterScale;
|
||||||
while(quadTextureSize < neededSize)
|
while(quadTextureSize < neededSize)
|
||||||
quadTextureSize *=2;
|
quadTextureSize *=2;
|
||||||
|
|
||||||
@ -460,13 +585,13 @@ bool CDirect3D::BlankTexture(LPDIRECT3DTEXTURE9 texture)
|
|||||||
changes the draw surface size: deletes the old textures, creates a new texture
|
changes the draw surface size: deletes the old textures, creates a new texture
|
||||||
and calculate new vertices
|
and calculate new vertices
|
||||||
IN:
|
IN:
|
||||||
iScale - the scale that has to fit into the textures
|
scale - the scale that has to fit into the textures
|
||||||
-----
|
-----
|
||||||
returns true if successful, false otherwise
|
returns true if successful, false otherwise
|
||||||
*/
|
*/
|
||||||
bool CDirect3D::ChangeDrawSurfaceSize(int iScale)
|
bool CDirect3D::ChangeDrawSurfaceSize(unsigned int scale)
|
||||||
{
|
{
|
||||||
iFilterScale = iScale;
|
filterScale = scale;
|
||||||
|
|
||||||
if(pDevice) {
|
if(pDevice) {
|
||||||
DestroyDrawSurface();
|
DestroyDrawSurface();
|
||||||
@ -483,56 +608,10 @@ calculates the vertex coordinates
|
|||||||
*/
|
*/
|
||||||
void CDirect3D::SetupVertices()
|
void CDirect3D::SetupVertices()
|
||||||
{
|
{
|
||||||
float xFactor;
|
|
||||||
float yFactor;
|
|
||||||
float minFactor;
|
|
||||||
float renderWidthCalc,renderHeightCalc;
|
|
||||||
RECT drawRect;
|
RECT drawRect;
|
||||||
int hExtend = GUI.HeightExtend ? SNES_HEIGHT_EXTENDED : SNES_HEIGHT;
|
|
||||||
float snesAspect = (float)GUI.AspectWidth/hExtend;
|
|
||||||
void *pLockedVertexBuffer;
|
void *pLockedVertexBuffer;
|
||||||
|
|
||||||
if(GUI.Stretch) {
|
drawRect = CalculateDisplayRect(afterRenderWidth,afterRenderHeight,dPresentParams.BackBufferWidth,dPresentParams.BackBufferHeight);
|
||||||
if(GUI.AspectRatio) {
|
|
||||||
//fix for hi-res images with FILTER_NONE
|
|
||||||
//where we need to correct the aspect ratio
|
|
||||||
renderWidthCalc = (float)afterRenderWidth;
|
|
||||||
renderHeightCalc = (float)afterRenderHeight;
|
|
||||||
if(renderWidthCalc/renderHeightCalc>snesAspect)
|
|
||||||
renderWidthCalc = renderHeightCalc * snesAspect;
|
|
||||||
else if(renderWidthCalc/renderHeightCalc<snesAspect)
|
|
||||||
renderHeightCalc = renderWidthCalc / snesAspect;
|
|
||||||
|
|
||||||
xFactor = (float)dPresentParams.BackBufferWidth / renderWidthCalc;
|
|
||||||
yFactor = (float)dPresentParams.BackBufferHeight / renderHeightCalc;
|
|
||||||
minFactor = xFactor < yFactor ? xFactor : yFactor;
|
|
||||||
|
|
||||||
drawRect.right = (LONG)(renderWidthCalc * minFactor);
|
|
||||||
drawRect.bottom = (LONG)(renderHeightCalc * minFactor);
|
|
||||||
|
|
||||||
drawRect.left = (dPresentParams.BackBufferWidth - drawRect.right) / 2;
|
|
||||||
drawRect.top = (dPresentParams.BackBufferHeight - drawRect.bottom) / 2;
|
|
||||||
drawRect.right += drawRect.left;
|
|
||||||
drawRect.bottom += drawRect.top;
|
|
||||||
} else {
|
|
||||||
drawRect.top = 0;
|
|
||||||
drawRect.left = 0;
|
|
||||||
drawRect.right = dPresentParams.BackBufferWidth;
|
|
||||||
drawRect.bottom = dPresentParams.BackBufferHeight;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
drawRect.left = ((int)(dPresentParams.BackBufferWidth) - (int)afterRenderWidth) / 2;
|
|
||||||
drawRect.top = ((int)(dPresentParams.BackBufferHeight) - (int)afterRenderHeight) / 2;
|
|
||||||
if(drawRect.left < 0) drawRect.left = 0;
|
|
||||||
if(drawRect.top < 0) drawRect.top = 0;
|
|
||||||
drawRect.right = drawRect.left + afterRenderWidth;
|
|
||||||
drawRect.bottom = drawRect.top + afterRenderHeight;
|
|
||||||
|
|
||||||
//the lines below would downsize the image if window size is smaller than the output, but
|
|
||||||
//since the old directdraw code did not do that I've left it out
|
|
||||||
//if(drawRect.right > dPresentParams.BackBufferWidth) drawRect.right = dPresentParams.BackBufferWidth;
|
|
||||||
//if(drawRect.bottom > dPresentParams.BackBufferHeight) drawRect.bottom = dPresentParams.BackBufferHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
float tX = (float)afterRenderWidth / (float)quadTextureSize;
|
float tX = (float)afterRenderWidth / (float)quadTextureSize;
|
||||||
float tY = (float)afterRenderHeight / (float)quadTextureSize;
|
float tY = (float)afterRenderHeight / (float)quadTextureSize;
|
||||||
@ -564,7 +643,7 @@ bool CDirect3D::ChangeRenderSize(unsigned int newWidth, unsigned int newHeight)
|
|||||||
|
|
||||||
//if we already have the desired size no change is necessary
|
//if we already have the desired size no change is necessary
|
||||||
//during fullscreen no changes are allowed
|
//during fullscreen no changes are allowed
|
||||||
if(fullscreen || dPresentParams.BackBufferWidth == newWidth && dPresentParams.BackBufferHeight == newHeight)
|
if(dPresentParams.BackBufferWidth == newWidth && dPresentParams.BackBufferHeight == newHeight)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if(!ResetDevice())
|
if(!ResetDevice())
|
||||||
@ -581,13 +660,16 @@ returns true if successful, false otherwise
|
|||||||
*/
|
*/
|
||||||
bool CDirect3D::ResetDevice()
|
bool CDirect3D::ResetDevice()
|
||||||
{
|
{
|
||||||
if(!pDevice) return false;
|
if(!init_done) return false;
|
||||||
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
//release prior to reset
|
//release prior to reset
|
||||||
DestroyDrawSurface();
|
DestroyDrawSurface();
|
||||||
|
|
||||||
|
if(effect)
|
||||||
|
effect->OnLostDevice();
|
||||||
|
|
||||||
//zero or unknown values result in the current window size/display settings
|
//zero or unknown values result in the current window size/display settings
|
||||||
dPresentParams.BackBufferWidth = 0;
|
dPresentParams.BackBufferWidth = 0;
|
||||||
dPresentParams.BackBufferHeight = 0;
|
dPresentParams.BackBufferHeight = 0;
|
||||||
@ -614,6 +696,9 @@ bool CDirect3D::ResetDevice()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(effect)
|
||||||
|
effect->OnResetDevice();
|
||||||
|
|
||||||
if(GUI.BilinearFilter) {
|
if(GUI.BilinearFilter) {
|
||||||
pDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
|
pDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
|
||||||
pDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
|
pDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
|
||||||
@ -722,5 +807,10 @@ returns true if successful, false otherwise
|
|||||||
*/
|
*/
|
||||||
bool CDirect3D::ApplyDisplayChanges(void)
|
bool CDirect3D::ApplyDisplayChanges(void)
|
||||||
{
|
{
|
||||||
|
if(GUI.shaderEnabled && GUI.HLSLshaderFileName)
|
||||||
|
SetShader(GUI.HLSLshaderFileName);
|
||||||
|
else
|
||||||
|
SetShader(NULL);
|
||||||
|
|
||||||
return ChangeRenderSize(0,0);
|
return ChangeRenderSize(0,0);
|
||||||
}
|
}
|
||||||
|
@ -177,8 +177,12 @@
|
|||||||
#ifndef W9XDIRECT3D_H
|
#ifndef W9XDIRECT3D_H
|
||||||
#define W9XDIRECT3D_H
|
#define W9XDIRECT3D_H
|
||||||
|
|
||||||
#include <windows.h>
|
#define MAX_SHADER_TEXTURES 8
|
||||||
|
|
||||||
#include <d3d9.h>
|
#include <d3d9.h>
|
||||||
|
#include <d3dx9.h>
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
#include "wsnes9x.h"
|
#include "wsnes9x.h"
|
||||||
#include "IS9xDisplayOutput.h"
|
#include "IS9xDisplayOutput.h"
|
||||||
@ -205,19 +209,28 @@ private:
|
|||||||
|
|
||||||
LPDIRECT3DVERTEXBUFFER9 vertexBuffer;
|
LPDIRECT3DVERTEXBUFFER9 vertexBuffer;
|
||||||
D3DPRESENT_PARAMETERS dPresentParams;
|
D3DPRESENT_PARAMETERS dPresentParams;
|
||||||
int iFilterScale; //the current maximum filter scale (at least 2)
|
unsigned int filterScale; //the current maximum filter scale (at least 2)
|
||||||
unsigned int afterRenderWidth, afterRenderHeight; //dimensions after filter has been applied
|
unsigned int afterRenderWidth, afterRenderHeight; //dimensions after filter has been applied
|
||||||
unsigned int quadTextureSize; //size of the texture (only multiples of 2)
|
unsigned int quadTextureSize; //size of the texture (only multiples of 2)
|
||||||
bool fullscreen; //are we currently displaying in fullscreen mode
|
bool fullscreen; //are we currently displaying in fullscreen mode
|
||||||
|
|
||||||
VERTEX triangleStripVertices[4]; //the 4 vertices that make up our display rectangle
|
VERTEX triangleStripVertices[4]; //the 4 vertices that make up our display rectangle
|
||||||
|
|
||||||
|
LPD3DXEFFECT effect;
|
||||||
|
LPDIRECT3DTEXTURE9 rubyLUT[MAX_SHADER_TEXTURES];
|
||||||
|
bool shader_compiled;
|
||||||
|
float shaderTimer;
|
||||||
|
int shaderTimeStart;
|
||||||
|
int shaderTimeElapsed;
|
||||||
|
|
||||||
bool BlankTexture(LPDIRECT3DTEXTURE9 texture);
|
bool BlankTexture(LPDIRECT3DTEXTURE9 texture);
|
||||||
void CreateDrawSurface();
|
void CreateDrawSurface();
|
||||||
void DestroyDrawSurface();
|
void DestroyDrawSurface();
|
||||||
bool ChangeDrawSurfaceSize(int iScale);
|
bool ChangeDrawSurfaceSize(unsigned int scale);
|
||||||
void SetupVertices();
|
void SetupVertices();
|
||||||
bool ResetDevice();
|
bool ResetDevice();
|
||||||
|
void SetShaderVars();
|
||||||
|
bool SetShader(const TCHAR *file);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDirect3D();
|
CDirect3D();
|
||||||
@ -232,4 +245,4 @@ public:
|
|||||||
void EnumModes(std::vector<dMode> *modeVector);
|
void EnumModes(std::vector<dMode> *modeVector);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -206,6 +206,8 @@ CDirectDraw::CDirectDraw()
|
|||||||
depth = -1;
|
depth = -1;
|
||||||
doubleBuffered = false;
|
doubleBuffered = false;
|
||||||
dDinitialized = false;
|
dDinitialized = false;
|
||||||
|
convertBuffer = NULL;
|
||||||
|
filterScale = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CDirectDraw::~CDirectDraw()
|
CDirectDraw::~CDirectDraw()
|
||||||
@ -270,6 +272,11 @@ void CDirectDraw::DeInitialize()
|
|||||||
lpDD->Release();
|
lpDD->Release();
|
||||||
lpDD = NULL;
|
lpDD = NULL;
|
||||||
}
|
}
|
||||||
|
if(convertBuffer) {
|
||||||
|
delete [] convertBuffer;
|
||||||
|
convertBuffer = NULL;
|
||||||
|
}
|
||||||
|
filterScale = 0;
|
||||||
dDinitialized = false;
|
dDinitialized = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -543,6 +550,8 @@ void CDirectDraw::Render(SSurface Src)
|
|||||||
|
|
||||||
DDSCAPS caps;
|
DDSCAPS caps;
|
||||||
|
|
||||||
|
unsigned int newFilterScale;
|
||||||
|
|
||||||
ZeroMemory(&caps,sizeof(DDSCAPS));
|
ZeroMemory(&caps,sizeof(DDSCAPS));
|
||||||
caps.dwCaps = DDSCAPS_BACKBUFFER;
|
caps.dwCaps = DDSCAPS_BACKBUFFER;
|
||||||
|
|
||||||
@ -561,9 +570,17 @@ void CDirectDraw::Render(SSurface Src)
|
|||||||
if (!GUI.DepthConverted)
|
if (!GUI.DepthConverted)
|
||||||
{
|
{
|
||||||
SSurface tmp;
|
SSurface tmp;
|
||||||
static BYTE buf[SNES_WIDTH * sizeof(uint16) * SNES_HEIGHT_EXTENDED * sizeof(uint16) *4*4];
|
|
||||||
|
newFilterScale = max(2,max(GetFilterScale(GUI.ScaleHiRes),GetFilterScale(GUI.Scale)));
|
||||||
|
|
||||||
tmp.Surface = buf;
|
if(newFilterScale!=filterScale) {
|
||||||
|
if(convertBuffer)
|
||||||
|
delete [] convertBuffer;
|
||||||
|
filterScale = newFilterScale;
|
||||||
|
convertBuffer = new unsigned char[SNES_WIDTH * sizeof(uint16) * SNES_HEIGHT_EXTENDED * sizeof(uint16) *filterScale*filterScale]();
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp.Surface = convertBuffer;
|
||||||
|
|
||||||
if(CurrentScale == FILTER_NONE) {
|
if(CurrentScale == FILTER_NONE) {
|
||||||
tmp.Pitch = Src.Pitch;
|
tmp.Pitch = Src.Pitch;
|
||||||
@ -719,6 +736,10 @@ void CDirectDraw::Render(SSurface Src)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(GUI.Vsync) {
|
||||||
|
lpDD->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN,NULL);
|
||||||
|
}
|
||||||
|
|
||||||
lpDDSPrimary2->Flip (NULL, GUI.Vsync?DDFLIP_WAIT:DDFLIP_NOVSYNC);
|
lpDDSPrimary2->Flip (NULL, GUI.Vsync?DDFLIP_WAIT:DDFLIP_NOVSYNC);
|
||||||
|
|
||||||
SizeHistory [GUI.FlipCounter % GUI.NumFlipFrames] = dstRect;
|
SizeHistory [GUI.FlipCounter % GUI.NumFlipFrames] = dstRect;
|
||||||
|
@ -209,6 +209,9 @@ public:
|
|||||||
bool clipped;
|
bool clipped;
|
||||||
bool dDinitialized;
|
bool dDinitialized;
|
||||||
|
|
||||||
|
unsigned char *convertBuffer;
|
||||||
|
unsigned int filterScale;
|
||||||
|
|
||||||
DDPIXELFORMAT DDPixelFormat;
|
DDPIXELFORMAT DDPixelFormat;
|
||||||
public:
|
public:
|
||||||
bool SetDisplayMode(
|
bool SetDisplayMode(
|
||||||
|
557
win32/COpenGL.cpp
Normal file
557
win32/COpenGL.cpp
Normal file
@ -0,0 +1,557 @@
|
|||||||
|
#include "COpenGL.h"
|
||||||
|
#include "win32_display.h"
|
||||||
|
#include "../snes9x.h"
|
||||||
|
#include "../gfx.h"
|
||||||
|
#include "../display.h"
|
||||||
|
#include "wsnes9x.h"
|
||||||
|
|
||||||
|
#include "../filter/hq2x.h"
|
||||||
|
#include "../filter/2xsai.h"
|
||||||
|
|
||||||
|
|
||||||
|
COpenGL::COpenGL(void)
|
||||||
|
{
|
||||||
|
hDC = NULL;
|
||||||
|
hRC = NULL;
|
||||||
|
hWnd = NULL;
|
||||||
|
drawTexture = 0;
|
||||||
|
initDone = false;
|
||||||
|
quadTextureSize = 0;
|
||||||
|
filterScale = 0;
|
||||||
|
afterRenderWidth = 0;
|
||||||
|
afterRenderHeight = 0;
|
||||||
|
fullscreen = false;
|
||||||
|
shaderFunctionsLoaded = false;
|
||||||
|
shaderCompiled = false;
|
||||||
|
pboFunctionsLoaded = false;
|
||||||
|
shaderProgram = 0;
|
||||||
|
vertexShader = 0;
|
||||||
|
fragmentShader = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
COpenGL::~COpenGL(void)
|
||||||
|
{
|
||||||
|
DeInitialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool COpenGL::Initialize(HWND hWnd)
|
||||||
|
{
|
||||||
|
int pfdIndex;
|
||||||
|
RECT windowRect;
|
||||||
|
|
||||||
|
this->hWnd = hWnd;
|
||||||
|
this->hDC = GetDC(hWnd);
|
||||||
|
|
||||||
|
PIXELFORMATDESCRIPTOR pfd=
|
||||||
|
{
|
||||||
|
sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor
|
||||||
|
1, // Version Number
|
||||||
|
PFD_DRAW_TO_WINDOW | // Format Must Support Window
|
||||||
|
PFD_SUPPORT_OPENGL | // Format Must Support OpenGL
|
||||||
|
PFD_DOUBLEBUFFER, // Must Support Double Buffering
|
||||||
|
PFD_TYPE_RGBA, // Request An RGBA Format
|
||||||
|
16, // Select Our Color Depth
|
||||||
|
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, // Accumulation Bits Ignored
|
||||||
|
16, // 16Bit Z-Buffer (Depth Buffer)
|
||||||
|
0, // No Stencil Buffer
|
||||||
|
0, // No Auxiliary Buffer
|
||||||
|
PFD_MAIN_PLANE, // Main Drawing Layer
|
||||||
|
0, // Reserved
|
||||||
|
0, 0, 0 // Layer Masks Ignored
|
||||||
|
};
|
||||||
|
PIXELFORMATDESCRIPTOR pfdSel;
|
||||||
|
|
||||||
|
if(!(pfdIndex=ChoosePixelFormat(hDC,&pfd))) {
|
||||||
|
DeInitialize();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(!SetPixelFormat(hDC,pfdIndex,&pfd)) {
|
||||||
|
DeInitialize();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(!(hRC=wglCreateContext(hDC))) {
|
||||||
|
DeInitialize();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(!wglMakeCurrent(hDC,hRC)) {
|
||||||
|
DeInitialize();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
LoadPBOFunctions();
|
||||||
|
|
||||||
|
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress( "wglSwapIntervalEXT" );
|
||||||
|
|
||||||
|
glEnable(GL_VERTEX_ARRAY);
|
||||||
|
glEnable(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
glEnable(GL_BLEND);
|
||||||
|
glEnable(GL_PIXEL_UNPACK_BUFFER);
|
||||||
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
|
glMatrixMode (GL_PROJECTION);
|
||||||
|
glLoadIdentity ();
|
||||||
|
glOrtho (0.0, 1.0, 0.0, 1.0, -1, 1);
|
||||||
|
|
||||||
|
glVertexPointer(2, GL_FLOAT, 0, vertices);
|
||||||
|
glTexCoordPointer(2, GL_FLOAT, 0, texcoords);
|
||||||
|
|
||||||
|
GetClientRect(hWnd,&windowRect);
|
||||||
|
ChangeRenderSize(windowRect.right,windowRect.bottom);
|
||||||
|
|
||||||
|
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
SwapBuffers(hDC);
|
||||||
|
|
||||||
|
initDone = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void COpenGL::DeInitialize()
|
||||||
|
{
|
||||||
|
initDone = false;
|
||||||
|
if(shaderCompiled)
|
||||||
|
SetShaders(NULL,NULL);
|
||||||
|
DestroyDrawSurface();
|
||||||
|
wglMakeCurrent(NULL,NULL);
|
||||||
|
if(hRC) {
|
||||||
|
wglDeleteContext(hRC);
|
||||||
|
hRC = NULL;
|
||||||
|
}
|
||||||
|
if(hDC) {
|
||||||
|
ReleaseDC(hWnd,hDC);
|
||||||
|
hDC = NULL;
|
||||||
|
}
|
||||||
|
hWnd = NULL;
|
||||||
|
initDone = false;
|
||||||
|
quadTextureSize = 0;
|
||||||
|
filterScale = 0;
|
||||||
|
afterRenderWidth = 0;
|
||||||
|
afterRenderHeight = 0;
|
||||||
|
shaderFunctionsLoaded = false;
|
||||||
|
shaderCompiled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void COpenGL::CreateDrawSurface()
|
||||||
|
{
|
||||||
|
unsigned int neededSize;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
//we need at least 512 pixels (SNES_WIDTH * 2) so we can start with that value
|
||||||
|
quadTextureSize = 512;
|
||||||
|
neededSize = SNES_WIDTH * filterScale;
|
||||||
|
while(quadTextureSize < neededSize)
|
||||||
|
quadTextureSize *=2;
|
||||||
|
|
||||||
|
if(!drawTexture) {
|
||||||
|
glGenTextures(1,&drawTexture);
|
||||||
|
glBindTexture(GL_TEXTURE_2D,drawTexture);
|
||||||
|
glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,quadTextureSize,quadTextureSize,0,GL_RGB,GL_UNSIGNED_SHORT_5_6_5,NULL);
|
||||||
|
if(pboFunctionsLoaded) {
|
||||||
|
glGenBuffers(1,&drawBuffer);
|
||||||
|
glBindBuffer(GL_PIXEL_UNPACK_BUFFER,drawBuffer);
|
||||||
|
glBufferData(GL_PIXEL_UNPACK_BUFFER,quadTextureSize*quadTextureSize*2,NULL,GL_STREAM_DRAW);
|
||||||
|
} else {
|
||||||
|
noPboBuffer = new BYTE[quadTextureSize*quadTextureSize*2];
|
||||||
|
}
|
||||||
|
|
||||||
|
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
|
||||||
|
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
|
||||||
|
}
|
||||||
|
ApplyDisplayChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
void COpenGL::DestroyDrawSurface()
|
||||||
|
{
|
||||||
|
if(drawTexture) {
|
||||||
|
glDeleteTextures(1,&drawTexture);
|
||||||
|
drawTexture = NULL;
|
||||||
|
}
|
||||||
|
if(drawBuffer) {
|
||||||
|
glDeleteBuffers(1,&drawBuffer);
|
||||||
|
drawBuffer = NULL;
|
||||||
|
}
|
||||||
|
if(noPboBuffer) {
|
||||||
|
delete [] noPboBuffer;
|
||||||
|
noPboBuffer = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool COpenGL::ChangeDrawSurfaceSize(unsigned int scale)
|
||||||
|
{
|
||||||
|
filterScale = scale;
|
||||||
|
|
||||||
|
DestroyDrawSurface();
|
||||||
|
CreateDrawSurface();
|
||||||
|
SetupVertices();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void COpenGL::SetupVertices()
|
||||||
|
{
|
||||||
|
vertices[0] = 0.0f;
|
||||||
|
vertices[1] = 0.0f;
|
||||||
|
vertices[2] = 1.0f;
|
||||||
|
vertices[3] = 0.0f;
|
||||||
|
vertices[4] = 1.0f;
|
||||||
|
vertices[5] = 1.0f;
|
||||||
|
vertices[6] = 0.0f;
|
||||||
|
vertices[7] = 1.0f;
|
||||||
|
|
||||||
|
float tX = (float)afterRenderWidth / (float)quadTextureSize;
|
||||||
|
float tY = (float)afterRenderHeight / (float)quadTextureSize;
|
||||||
|
|
||||||
|
texcoords[0] = 0.0f;
|
||||||
|
texcoords[1] = tY;
|
||||||
|
texcoords[2] = tX;
|
||||||
|
texcoords[3] = tY;
|
||||||
|
texcoords[4] = tX;
|
||||||
|
texcoords[5] = 0.0f;
|
||||||
|
texcoords[6] = 0.0f;
|
||||||
|
texcoords[7] = 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
void COpenGL::Render(SSurface Src)
|
||||||
|
{
|
||||||
|
SSurface Dst;
|
||||||
|
RECT dstRect;
|
||||||
|
unsigned int newFilterScale;
|
||||||
|
GLenum error;
|
||||||
|
|
||||||
|
if(!initDone) return;
|
||||||
|
|
||||||
|
//create a new draw surface if the filter scale changes
|
||||||
|
//at least factor 2 so we can display unscaled hi-res images
|
||||||
|
newFilterScale = max(2,max(GetFilterScale(GUI.ScaleHiRes),GetFilterScale(GUI.Scale)));
|
||||||
|
if(newFilterScale!=filterScale) {
|
||||||
|
ChangeDrawSurfaceSize(newFilterScale);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pboFunctionsLoaded) {
|
||||||
|
Dst.Surface = (unsigned char *)glMapBuffer(GL_PIXEL_UNPACK_BUFFER,GL_WRITE_ONLY);
|
||||||
|
} else {
|
||||||
|
Dst.Surface = noPboBuffer;
|
||||||
|
}
|
||||||
|
Dst.Height = quadTextureSize;
|
||||||
|
Dst.Width = quadTextureSize;
|
||||||
|
Dst.Pitch = quadTextureSize * 2;
|
||||||
|
|
||||||
|
RenderMethod (Src, Dst, &dstRect);
|
||||||
|
if(!Settings.AutoDisplayMessages) {
|
||||||
|
WinSetCustomDisplaySurface((void *)Dst.Surface, Dst.Pitch/2, dstRect.right-dstRect.left, dstRect.bottom-dstRect.top, GetFilterScale(CurrentScale));
|
||||||
|
S9xDisplayMessages ((uint16*)Dst.Surface, Dst.Pitch/2, dstRect.right-dstRect.left, dstRect.bottom-dstRect.top, GetFilterScale(CurrentScale));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pboFunctionsLoaded)
|
||||||
|
glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
|
||||||
|
|
||||||
|
if(afterRenderHeight != dstRect.bottom || afterRenderWidth != dstRect.right) {
|
||||||
|
afterRenderHeight = dstRect.bottom;
|
||||||
|
afterRenderWidth = dstRect.right;
|
||||||
|
ApplyDisplayChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (shaderCompiled) {
|
||||||
|
GLint location;
|
||||||
|
|
||||||
|
float inputSize[2] = { afterRenderWidth, afterRenderHeight };
|
||||||
|
location = glGetUniformLocation (shaderProgram, "rubyInputSize");
|
||||||
|
glUniform2fv (location, 1, inputSize);
|
||||||
|
|
||||||
|
RECT windowSize;
|
||||||
|
GetClientRect(hWnd,&windowSize);
|
||||||
|
|
||||||
|
float outputSize[2] = {GUI.Stretch?windowSize.right:afterRenderWidth,
|
||||||
|
GUI.Stretch?windowSize.bottom:afterRenderHeight };
|
||||||
|
location = glGetUniformLocation (shaderProgram, "rubyOutputSize");
|
||||||
|
glUniform2fv (location, 1, outputSize);
|
||||||
|
|
||||||
|
float textureSize[2] = { quadTextureSize, quadTextureSize };
|
||||||
|
location = glGetUniformLocation (shaderProgram, "rubyTextureSize");
|
||||||
|
glUniform2fv (location, 1, textureSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
glPixelStorei(GL_UNPACK_ROW_LENGTH, quadTextureSize);
|
||||||
|
glTexSubImage2D (GL_TEXTURE_2D,0,0,0,dstRect.right-dstRect.left,dstRect.bottom-dstRect.top,GL_RGB,GL_UNSIGNED_SHORT_5_6_5,pboFunctionsLoaded?0:noPboBuffer);
|
||||||
|
|
||||||
|
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
glDrawArrays (GL_QUADS, 0, 4);
|
||||||
|
|
||||||
|
glFlush();
|
||||||
|
SwapBuffers(hDC);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool COpenGL::ChangeRenderSize(unsigned int newWidth, unsigned int newHeight)
|
||||||
|
{
|
||||||
|
RECT displayRect=CalculateDisplayRect(afterRenderWidth,afterRenderHeight,newWidth,newHeight);
|
||||||
|
glViewport(displayRect.left,newHeight-displayRect.bottom,displayRect.right-displayRect.left,displayRect.bottom-displayRect.top);
|
||||||
|
SetupVertices();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool COpenGL::ApplyDisplayChanges(void)
|
||||||
|
{
|
||||||
|
if(GUI.BilinearFilter) {
|
||||||
|
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
|
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
|
} else {
|
||||||
|
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
|
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
|
}
|
||||||
|
if(wglSwapIntervalEXT) {
|
||||||
|
wglSwapIntervalEXT(GUI.Vsync?1:0);
|
||||||
|
}
|
||||||
|
if(GUI.shaderEnabled && GUI.GLSLvertexShaderFileName && GUI.GLSLfragmentShaderFileName)
|
||||||
|
SetShaders(GUI.GLSLfragmentShaderFileName,GUI.GLSLvertexShaderFileName);
|
||||||
|
else
|
||||||
|
SetShaders(NULL,NULL);
|
||||||
|
|
||||||
|
RECT windowSize;
|
||||||
|
GetClientRect(hWnd,&windowSize);
|
||||||
|
ChangeRenderSize(windowSize.right,windowSize.bottom);
|
||||||
|
SetupVertices();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool COpenGL::SetFullscreen(bool fullscreen)
|
||||||
|
{
|
||||||
|
if(!initDone)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if(this->fullscreen==fullscreen)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
this->fullscreen = fullscreen;
|
||||||
|
|
||||||
|
if(fullscreen) {
|
||||||
|
DEVMODE dmScreenSettings={0};
|
||||||
|
dmScreenSettings.dmSize=sizeof(dmScreenSettings);
|
||||||
|
dmScreenSettings.dmPelsWidth = GUI.FullscreenMode.width;
|
||||||
|
dmScreenSettings.dmPelsHeight = GUI.FullscreenMode.height;
|
||||||
|
dmScreenSettings.dmBitsPerPel = GUI.FullscreenMode.depth;
|
||||||
|
dmScreenSettings.dmDisplayFrequency = GUI.FullscreenMode.rate;
|
||||||
|
dmScreenSettings.dmFields=DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT|DM_DISPLAYFREQUENCY;
|
||||||
|
if(ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL) {
|
||||||
|
this->fullscreen = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ChangeRenderSize(GUI.FullscreenMode.width,GUI.FullscreenMode.height);
|
||||||
|
} else {
|
||||||
|
ChangeDisplaySettings(NULL,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void COpenGL::SetSnes9xColorFormat()
|
||||||
|
{
|
||||||
|
GUI.ScreenDepth = 16;
|
||||||
|
GUI.BlueShift = 0;
|
||||||
|
GUI.GreenShift = 6;
|
||||||
|
GUI.RedShift = 11;
|
||||||
|
S9xSetRenderPixelFormat (RGB565);
|
||||||
|
S9xBlit2xSaIFilterInit();
|
||||||
|
S9xBlitHQ2xFilterInit();
|
||||||
|
GUI.NeedDepthConvert = FALSE;
|
||||||
|
GUI.DepthConverted = TRUE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void COpenGL::EnumModes(std::vector<dMode> *modeVector)
|
||||||
|
{
|
||||||
|
DISPLAY_DEVICE dd;
|
||||||
|
dd.cb = sizeof(dd);
|
||||||
|
DWORD dev = 0;
|
||||||
|
int iMode = 0;
|
||||||
|
dMode mode;
|
||||||
|
|
||||||
|
while (EnumDisplayDevices(0, dev, &dd, 0))
|
||||||
|
{
|
||||||
|
if (!(dd.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER) && (dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE))
|
||||||
|
{
|
||||||
|
DEVMODE dm;
|
||||||
|
ZeroMemory(&dm, sizeof(dm));
|
||||||
|
dm.dmSize = sizeof(dm);
|
||||||
|
iMode = 0;
|
||||||
|
while(EnumDisplaySettings(dd.DeviceName,iMode,&dm)) {
|
||||||
|
if(dm.dmBitsPerPel>=16) {
|
||||||
|
mode.width = dm.dmPelsWidth;
|
||||||
|
mode.height = dm.dmPelsHeight;
|
||||||
|
mode.rate = dm.dmDisplayFrequency;
|
||||||
|
mode.depth = dm.dmBitsPerPel;
|
||||||
|
modeVector->push_back(mode);
|
||||||
|
}
|
||||||
|
iMode++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dev++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool COpenGL::LoadPBOFunctions()
|
||||||
|
{
|
||||||
|
if(pboFunctionsLoaded)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
const char *extensions = (const char *) glGetString(GL_EXTENSIONS);
|
||||||
|
|
||||||
|
if(extensions && strstr(extensions, "pixel_buffer_object")) {
|
||||||
|
glGenBuffers = (PFNGLGENBUFFERSPROC)wglGetProcAddress("glGenBuffers");
|
||||||
|
glBindBuffer = (PFNGLBINDBUFFERPROC)wglGetProcAddress("glBindBuffer");
|
||||||
|
glBufferData = (PFNGLBUFFERDATAPROC)wglGetProcAddress("glBufferData");
|
||||||
|
glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)wglGetProcAddress("glDeleteBuffers");
|
||||||
|
glMapBuffer = (PFNGLMAPBUFFERPROC)wglGetProcAddress("glMapBuffer");
|
||||||
|
glUnmapBuffer = (PFNGLUNMAPBUFFERPROC)wglGetProcAddress("glUnmapBuffer");
|
||||||
|
|
||||||
|
if(glGenBuffers && glBindBuffer && glBufferData && glDeleteBuffers && glMapBuffer) {
|
||||||
|
pboFunctionsLoaded = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return pboFunctionsLoaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool COpenGL::LoadShaderFunctions()
|
||||||
|
{
|
||||||
|
if(shaderFunctionsLoaded)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
const char *extensions = (const char *) glGetString(GL_EXTENSIONS);
|
||||||
|
|
||||||
|
if(extensions && strstr(extensions, "fragment_program")) {
|
||||||
|
glCreateProgram = (PFNGLCREATEPROGRAMPROC) wglGetProcAddress ("glCreateProgram");
|
||||||
|
glCreateShader = (PFNGLCREATESHADERPROC) wglGetProcAddress ("glCreateShader");
|
||||||
|
glCompileShader = (PFNGLCOMPILESHADERPROC) wglGetProcAddress ("glCompileShader");
|
||||||
|
glDeleteShader = (PFNGLDELETESHADERPROC) wglGetProcAddress ("glDeleteShader");
|
||||||
|
glDeleteProgram = (PFNGLDELETEPROGRAMPROC) wglGetProcAddress ("glDeleteProgram");
|
||||||
|
glAttachShader = (PFNGLATTACHSHADERPROC) wglGetProcAddress ("glAttachShader");
|
||||||
|
glDetachShader = (PFNGLDETACHSHADERPROC) wglGetProcAddress ("glDetachShader");
|
||||||
|
glLinkProgram = (PFNGLLINKPROGRAMPROC) wglGetProcAddress ("glLinkProgram");
|
||||||
|
glUseProgram = (PFNGLUSEPROGRAMPROC) wglGetProcAddress ("glUseProgram");
|
||||||
|
glShaderSource = (PFNGLSHADERSOURCEPROC) wglGetProcAddress ("glShaderSource");
|
||||||
|
glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) wglGetProcAddress ("glGetUniformLocation");
|
||||||
|
glUniform2fv = (PFNGLUNIFORM2FVPROC) wglGetProcAddress ("glUniform2fv");
|
||||||
|
|
||||||
|
if(glCreateProgram &&
|
||||||
|
glCreateShader &&
|
||||||
|
glCompileShader &&
|
||||||
|
glDeleteShader &&
|
||||||
|
glDeleteProgram &&
|
||||||
|
glAttachShader &&
|
||||||
|
glDetachShader &&
|
||||||
|
glLinkProgram &&
|
||||||
|
glUseProgram &&
|
||||||
|
glShaderSource &&
|
||||||
|
glGetUniformLocation &&
|
||||||
|
glUniform2fv) {
|
||||||
|
shaderFunctionsLoaded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return shaderFunctionsLoaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *ReadFileContents(const TCHAR *filename)
|
||||||
|
{
|
||||||
|
HANDLE hFile;
|
||||||
|
DWORD size;
|
||||||
|
DWORD bytesRead;
|
||||||
|
char *contents;
|
||||||
|
|
||||||
|
hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL,
|
||||||
|
OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN , 0);
|
||||||
|
if(hFile == INVALID_HANDLE_VALUE){
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
size = GetFileSize(hFile,NULL);
|
||||||
|
contents = new char[size+1];
|
||||||
|
if(!ReadFile(hFile,contents,size,&bytesRead,NULL)) {
|
||||||
|
CloseHandle(hFile);
|
||||||
|
delete[] contents;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
CloseHandle(hFile);
|
||||||
|
contents[size] = '\0';
|
||||||
|
return contents;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool COpenGL::SetShaders(const TCHAR *fragmentFileName,const TCHAR *vertexFileName)
|
||||||
|
{
|
||||||
|
char *fragment=NULL, *vertex=NULL;
|
||||||
|
|
||||||
|
shaderCompiled = false;
|
||||||
|
|
||||||
|
if(fragmentShader) {
|
||||||
|
glDetachShader(shaderProgram,fragmentShader);
|
||||||
|
glDeleteShader(fragmentShader);
|
||||||
|
fragmentShader = 0;
|
||||||
|
}
|
||||||
|
if(vertexShader) {
|
||||||
|
glDetachShader(shaderProgram,vertexShader);
|
||||||
|
glDeleteShader(vertexShader);
|
||||||
|
vertexShader = 0;
|
||||||
|
}
|
||||||
|
if(shaderProgram) {
|
||||||
|
glUseProgram(0);
|
||||||
|
glDeleteProgram(shaderProgram);
|
||||||
|
shaderProgram = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(fragmentFileName==NULL||vertexFileName==NULL)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if(!LoadShaderFunctions()) {
|
||||||
|
MessageBox(NULL, TEXT("Unable to load OpenGL shader functions"), TEXT("Shader Loading Error"),
|
||||||
|
MB_OK|MB_ICONEXCLAMATION);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(*fragmentFileName!=TEXT('\0')) {
|
||||||
|
fragment = ReadFileContents(fragmentFileName);
|
||||||
|
if (!fragment) {
|
||||||
|
TCHAR errorMsg[MAX_PATH + 50];
|
||||||
|
_stprintf(errorMsg,TEXT("Error loading GLSL fragment shader file:\n%s"),fragmentFileName);
|
||||||
|
MessageBox(NULL, errorMsg, TEXT("Shader Loading Error"),
|
||||||
|
MB_OK|MB_ICONEXCLAMATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(*vertexFileName!=TEXT('\0')) {
|
||||||
|
vertex = ReadFileContents (vertexFileName);
|
||||||
|
if (!vertex) {
|
||||||
|
TCHAR errorMsg[MAX_PATH + 50];
|
||||||
|
_stprintf(errorMsg,TEXT("Error loading GLSL vertex shader file:\n%s"),vertexFileName);
|
||||||
|
MessageBox(NULL, errorMsg, TEXT("Shader Loading Error"),
|
||||||
|
MB_OK|MB_ICONEXCLAMATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shaderProgram = glCreateProgram ();
|
||||||
|
if(vertex) {
|
||||||
|
vertexShader = glCreateShader (GL_VERTEX_SHADER);
|
||||||
|
glShaderSource(vertexShader, 1, (const GLchar **)&vertex, NULL);
|
||||||
|
glCompileShader(vertexShader);
|
||||||
|
glAttachShader(shaderProgram, vertexShader);
|
||||||
|
delete[] vertex;
|
||||||
|
}
|
||||||
|
if(fragment) {
|
||||||
|
fragmentShader = glCreateShader (GL_FRAGMENT_SHADER);
|
||||||
|
glShaderSource(fragmentShader, 1, (const GLchar **)&fragment, NULL);
|
||||||
|
glCompileShader(fragmentShader);
|
||||||
|
glAttachShader(shaderProgram, fragmentShader);
|
||||||
|
delete[] fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
glLinkProgram(shaderProgram);
|
||||||
|
glUseProgram(shaderProgram);
|
||||||
|
|
||||||
|
shaderCompiled = true;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
265
win32/COpenGL.h
Normal file
265
win32/COpenGL.h
Normal file
@ -0,0 +1,265 @@
|
|||||||
|
/***********************************************************************************
|
||||||
|
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
||||||
|
|
||||||
|
(c) Copyright 1996 - 2002 Gary Henderson (gary.henderson@ntlworld.com),
|
||||||
|
Jerremy Koot (jkoot@snes9x.com)
|
||||||
|
|
||||||
|
(c) Copyright 2002 - 2004 Matthew Kendora
|
||||||
|
|
||||||
|
(c) Copyright 2002 - 2005 Peter Bortas (peter@bortas.org)
|
||||||
|
|
||||||
|
(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
|
||||||
|
|
||||||
|
(c) Copyright 2001 - 2006 John Weidman (jweidman@slip.net)
|
||||||
|
|
||||||
|
(c) Copyright 2002 - 2006 funkyass (funkyass@spam.shaw.ca),
|
||||||
|
Kris Bleakley (codeviolation@hotmail.com)
|
||||||
|
|
||||||
|
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
|
||||||
|
Nach (n-a-c-h@users.sourceforge.net),
|
||||||
|
zones (kasumitokoduck@yahoo.com)
|
||||||
|
|
||||||
|
(c) Copyright 2006 - 2007 nitsuja
|
||||||
|
|
||||||
|
(c) Copyright 2009 - 2010 BearOso,
|
||||||
|
OV2
|
||||||
|
|
||||||
|
|
||||||
|
BS-X C emulator code
|
||||||
|
(c) Copyright 2005 - 2006 Dreamer Nom,
|
||||||
|
zones
|
||||||
|
|
||||||
|
C4 x86 assembler and some C emulation code
|
||||||
|
(c) Copyright 2000 - 2003 _Demo_ (_demo_@zsnes.com),
|
||||||
|
Nach,
|
||||||
|
zsKnight (zsknight@zsnes.com)
|
||||||
|
|
||||||
|
C4 C++ code
|
||||||
|
(c) Copyright 2003 - 2006 Brad Jorsch,
|
||||||
|
Nach
|
||||||
|
|
||||||
|
DSP-1 emulator code
|
||||||
|
(c) Copyright 1998 - 2006 _Demo_,
|
||||||
|
Andreas Naive (andreasnaive@gmail.com),
|
||||||
|
Gary Henderson,
|
||||||
|
Ivar (ivar@snes9x.com),
|
||||||
|
John Weidman,
|
||||||
|
Kris Bleakley,
|
||||||
|
Matthew Kendora,
|
||||||
|
Nach,
|
||||||
|
neviksti (neviksti@hotmail.com)
|
||||||
|
|
||||||
|
DSP-2 emulator code
|
||||||
|
(c) Copyright 2003 John Weidman,
|
||||||
|
Kris Bleakley,
|
||||||
|
Lord Nightmare (lord_nightmare@users.sourceforge.net),
|
||||||
|
Matthew Kendora,
|
||||||
|
neviksti
|
||||||
|
|
||||||
|
DSP-3 emulator code
|
||||||
|
(c) Copyright 2003 - 2006 John Weidman,
|
||||||
|
Kris Bleakley,
|
||||||
|
Lancer,
|
||||||
|
z80 gaiden
|
||||||
|
|
||||||
|
DSP-4 emulator code
|
||||||
|
(c) Copyright 2004 - 2006 Dreamer Nom,
|
||||||
|
John Weidman,
|
||||||
|
Kris Bleakley,
|
||||||
|
Nach,
|
||||||
|
z80 gaiden
|
||||||
|
|
||||||
|
OBC1 emulator code
|
||||||
|
(c) Copyright 2001 - 2004 zsKnight,
|
||||||
|
pagefault (pagefault@zsnes.com),
|
||||||
|
Kris Bleakley
|
||||||
|
Ported from x86 assembler to C by sanmaiwashi
|
||||||
|
|
||||||
|
SPC7110 and RTC C++ emulator code used in 1.39-1.51
|
||||||
|
(c) Copyright 2002 Matthew Kendora with research by
|
||||||
|
zsKnight,
|
||||||
|
John Weidman,
|
||||||
|
Dark Force
|
||||||
|
|
||||||
|
SPC7110 and RTC C++ emulator code used in 1.52+
|
||||||
|
(c) Copyright 2009 byuu,
|
||||||
|
neviksti
|
||||||
|
|
||||||
|
S-DD1 C emulator code
|
||||||
|
(c) Copyright 2003 Brad Jorsch with research by
|
||||||
|
Andreas Naive,
|
||||||
|
John Weidman
|
||||||
|
|
||||||
|
S-RTC C emulator code
|
||||||
|
(c) Copyright 2001 - 2006 byuu,
|
||||||
|
John Weidman
|
||||||
|
|
||||||
|
ST010 C++ emulator code
|
||||||
|
(c) Copyright 2003 Feather,
|
||||||
|
John Weidman,
|
||||||
|
Kris Bleakley,
|
||||||
|
Matthew Kendora
|
||||||
|
|
||||||
|
Super FX x86 assembler emulator code
|
||||||
|
(c) Copyright 1998 - 2003 _Demo_,
|
||||||
|
pagefault,
|
||||||
|
zsKnight
|
||||||
|
|
||||||
|
Super FX C emulator code
|
||||||
|
(c) Copyright 1997 - 1999 Ivar,
|
||||||
|
Gary Henderson,
|
||||||
|
John Weidman
|
||||||
|
|
||||||
|
Sound emulator code used in 1.5-1.51
|
||||||
|
(c) Copyright 1998 - 2003 Brad Martin
|
||||||
|
(c) Copyright 1998 - 2006 Charles Bilyue'
|
||||||
|
|
||||||
|
Sound emulator code used in 1.52+
|
||||||
|
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
|
||||||
|
|
||||||
|
SH assembler code partly based on x86 assembler code
|
||||||
|
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
|
||||||
|
|
||||||
|
2xSaI filter
|
||||||
|
(c) Copyright 1999 - 2001 Derek Liauw Kie Fa
|
||||||
|
|
||||||
|
HQ2x, HQ3x, HQ4x filters
|
||||||
|
(c) Copyright 2003 Maxim Stepin (maxim@hiend3d.com)
|
||||||
|
|
||||||
|
NTSC filter
|
||||||
|
(c) Copyright 2006 - 2007 Shay Green
|
||||||
|
|
||||||
|
GTK+ GUI code
|
||||||
|
(c) Copyright 2004 - 2010 BearOso
|
||||||
|
|
||||||
|
Win32 GUI code
|
||||||
|
(c) Copyright 2003 - 2006 blip,
|
||||||
|
funkyass,
|
||||||
|
Matthew Kendora,
|
||||||
|
Nach,
|
||||||
|
nitsuja
|
||||||
|
(c) Copyright 2009 - 2010 OV2
|
||||||
|
|
||||||
|
Mac OS GUI code
|
||||||
|
(c) Copyright 1998 - 2001 John Stiles
|
||||||
|
(c) Copyright 2001 - 2010 zones
|
||||||
|
|
||||||
|
|
||||||
|
Specific ports contains the works of other authors. See headers in
|
||||||
|
individual files.
|
||||||
|
|
||||||
|
|
||||||
|
Snes9x homepage: http://www.snes9x.com/
|
||||||
|
|
||||||
|
Permission to use, copy, modify and/or distribute Snes9x in both binary
|
||||||
|
and source form, for non-commercial purposes, is hereby granted without
|
||||||
|
fee, providing that this license information and copyright notice appear
|
||||||
|
with all copies and any derived work.
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied
|
||||||
|
warranty. In no event shall the authors be held liable for any damages
|
||||||
|
arising from the use of this software or it's derivatives.
|
||||||
|
|
||||||
|
Snes9x is freeware for PERSONAL USE only. Commercial users should
|
||||||
|
seek permission of the copyright holders first. Commercial use includes,
|
||||||
|
but is not limited to, charging money for Snes9x or software derived from
|
||||||
|
Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
|
||||||
|
using Snes9x as a promotion for your commercial product.
|
||||||
|
|
||||||
|
The copyright holders request that bug fixes and improvements to the code
|
||||||
|
should be forwarded to them so everyone can benefit from the modifications
|
||||||
|
in future versions.
|
||||||
|
|
||||||
|
Super NES and Super Nintendo Entertainment System are trademarks of
|
||||||
|
Nintendo Co., Limited and its subsidiary companies.
|
||||||
|
***********************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef COPENGL_H
|
||||||
|
#define COPENGL_H
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
#include <gl\gl.h>
|
||||||
|
#include "glext.h"
|
||||||
|
#include "wglext.h"
|
||||||
|
#include "IS9xDisplayOutput.h"
|
||||||
|
|
||||||
|
/* IS9xDisplayOutput
|
||||||
|
Interface for display driver.
|
||||||
|
*/
|
||||||
|
class COpenGL : public IS9xDisplayOutput
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
HDC hDC;
|
||||||
|
HGLRC hRC;
|
||||||
|
HWND hWnd;
|
||||||
|
GLuint drawTexture;
|
||||||
|
GLuint drawBuffer;
|
||||||
|
GLfloat vertices[8];
|
||||||
|
GLfloat texcoords[8];
|
||||||
|
unsigned char * noPboBuffer;
|
||||||
|
|
||||||
|
bool initDone;
|
||||||
|
bool fullscreen;
|
||||||
|
unsigned int quadTextureSize;
|
||||||
|
unsigned int filterScale;
|
||||||
|
unsigned int afterRenderWidth, afterRenderHeight;
|
||||||
|
|
||||||
|
bool shaderFunctionsLoaded;
|
||||||
|
bool shaderCompiled;
|
||||||
|
|
||||||
|
bool pboFunctionsLoaded;
|
||||||
|
|
||||||
|
GLuint shaderProgram;
|
||||||
|
GLuint vertexShader;
|
||||||
|
GLuint fragmentShader;
|
||||||
|
|
||||||
|
// PBO Functions
|
||||||
|
PFNGLGENBUFFERSPROC glGenBuffers;
|
||||||
|
PFNGLBINDBUFFERPROC glBindBuffer;
|
||||||
|
PFNGLBUFFERDATAPROC glBufferData;
|
||||||
|
PFNGLDELETEBUFFERSPROC glDeleteBuffers;
|
||||||
|
PFNGLMAPBUFFERPROC glMapBuffer;
|
||||||
|
PFNGLUNMAPBUFFERPROC glUnmapBuffer;
|
||||||
|
|
||||||
|
// Shader Functions
|
||||||
|
|
||||||
|
PFNGLCREATEPROGRAMPROC glCreateProgram;
|
||||||
|
PFNGLCREATESHADERPROC glCreateShader;
|
||||||
|
PFNGLCOMPILESHADERPROC glCompileShader;
|
||||||
|
PFNGLDELETESHADERPROC glDeleteShader;
|
||||||
|
PFNGLDELETEPROGRAMPROC glDeleteProgram;
|
||||||
|
PFNGLATTACHSHADERPROC glAttachShader;
|
||||||
|
PFNGLDETACHSHADERPROC glDetachShader;
|
||||||
|
PFNGLLINKPROGRAMPROC glLinkProgram;
|
||||||
|
PFNGLUSEPROGRAMPROC glUseProgram;
|
||||||
|
PFNGLSHADERSOURCEPROC glShaderSource;
|
||||||
|
PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation;
|
||||||
|
PFNGLUNIFORM2FVPROC glUniform2fv;
|
||||||
|
|
||||||
|
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
|
||||||
|
|
||||||
|
bool SetShaders(const TCHAR *fragment,const TCHAR *vertex);
|
||||||
|
bool LoadShaderFunctions();
|
||||||
|
bool LoadPBOFunctions();
|
||||||
|
void CreateDrawSurface(void);
|
||||||
|
void DestroyDrawSurface(void);
|
||||||
|
bool ChangeDrawSurfaceSize(unsigned int scale);
|
||||||
|
void SetupVertices();
|
||||||
|
|
||||||
|
public:
|
||||||
|
COpenGL();
|
||||||
|
~COpenGL();
|
||||||
|
bool Initialize(HWND hWnd);
|
||||||
|
void DeInitialize();
|
||||||
|
void Render(SSurface Src);
|
||||||
|
bool ChangeRenderSize(unsigned int newWidth, unsigned int newHeight);
|
||||||
|
bool ApplyDisplayChanges(void);
|
||||||
|
bool SetFullscreen(bool fullscreen);
|
||||||
|
void SetSnes9xColorFormat(void);
|
||||||
|
void EnumModes(std::vector<dMode> *modeVector);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -225,7 +225,7 @@ bool CXAudio2::InitXAudio2(void)
|
|||||||
MessageBox (GUI.hWnd, TEXT("\
|
MessageBox (GUI.hWnd, TEXT("\
|
||||||
Unable to initialize XAudio2. You will not be able to hear any\n\
|
Unable to initialize XAudio2. You will not be able to hear any\n\
|
||||||
sound effects or music while playing.\n\n\
|
sound effects or music while playing.\n\n\
|
||||||
It is usually caused by not having a recent DirectX release installed."),
|
This is usually caused by not having a recent DirectX release installed."),
|
||||||
TEXT("Snes9X - Unable to Initialize XAudio2"),
|
TEXT("Snes9X - Unable to Initialize XAudio2"),
|
||||||
MB_OK | MB_ICONWARNING);
|
MB_OK | MB_ICONWARNING);
|
||||||
return false;
|
return false;
|
||||||
@ -400,4 +400,4 @@ void CXAudio2::ProcessSound()
|
|||||||
writeOffset+=singleBufferBytes;
|
writeOffset+=singleBufferBytes;
|
||||||
writeOffset%=sum_bufferSize;
|
writeOffset%=sum_bufferSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -180,6 +180,7 @@
|
|||||||
#define IS9XDISPLAYOUTPUT_H
|
#define IS9XDISPLAYOUTPUT_H
|
||||||
#include "../port.h"
|
#include "../port.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
#include "wsnes9x.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
/* IS9xDisplayOutput
|
/* IS9xDisplayOutput
|
||||||
@ -201,4 +202,4 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -184,7 +184,6 @@
|
|||||||
|
|
||||||
#define STRICT
|
#define STRICT
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <tchar.h>
|
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
|
||||||
#if (((defined(_MSC_VER) && _MSC_VER >= 1300)) || defined(__MINGW32__))
|
#if (((defined(_MSC_VER) && _MSC_VER >= 1300)) || defined(__MINGW32__))
|
||||||
@ -889,7 +888,7 @@ static LRESULT CALLBACK InputCustomWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
|
|||||||
{
|
{
|
||||||
// retrieve the custom structure POINTER for THIS window
|
// retrieve the custom structure POINTER for THIS window
|
||||||
InputCust *icp = GetInputCustom(hwnd);
|
InputCust *icp = GetInputCustom(hwnd);
|
||||||
HWND pappy = (HWND__ *)GetWindowLongPtr(hwnd,GWL_HWNDPARENT);
|
HWND pappy = (HWND__ *)GetWindowLongPtr(hwnd,GWLP_HWNDPARENT);
|
||||||
funky= hwnd;
|
funky= hwnd;
|
||||||
|
|
||||||
static HWND selectedItem = NULL;
|
static HWND selectedItem = NULL;
|
||||||
@ -950,7 +949,7 @@ static LRESULT CALLBACK InputCustomWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
|
|||||||
|
|
||||||
icp->crForeGnd = ((~col) & 0x00ffffff);
|
icp->crForeGnd = ((~col) & 0x00ffffff);
|
||||||
icp->crBackGnd = col;
|
icp->crBackGnd = col;
|
||||||
SetWindowText(hwnd,temp);
|
SetWindowText(hwnd,_tFromChar(temp));
|
||||||
InvalidateRect(icp->hwnd, NULL, FALSE);
|
InvalidateRect(icp->hwnd, NULL, FALSE);
|
||||||
UpdateWindow(icp->hwnd);
|
UpdateWindow(icp->hwnd);
|
||||||
SendMessage(pappy,WM_USER+43,wParam,(LPARAM)hwnd);
|
SendMessage(pappy,WM_USER+43,wParam,(LPARAM)hwnd);
|
||||||
@ -969,7 +968,7 @@ static LRESULT CALLBACK InputCustomWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
|
|||||||
}
|
}
|
||||||
icp->crForeGnd = ((~col) & 0x00ffffff);
|
icp->crForeGnd = ((~col) & 0x00ffffff);
|
||||||
icp->crBackGnd = col;
|
icp->crBackGnd = col;
|
||||||
SetWindowText(hwnd,temp);
|
SetWindowText(hwnd,_tFromChar(temp));
|
||||||
InvalidateRect(icp->hwnd, NULL, FALSE);
|
InvalidateRect(icp->hwnd, NULL, FALSE);
|
||||||
UpdateWindow(icp->hwnd);
|
UpdateWindow(icp->hwnd);
|
||||||
|
|
||||||
@ -1071,7 +1070,7 @@ static LRESULT CALLBACK HotInputCustomWndProc(HWND hwnd, UINT msg, WPARAM wParam
|
|||||||
{
|
{
|
||||||
// retrieve the custom structure POINTER for THIS window
|
// retrieve the custom structure POINTER for THIS window
|
||||||
InputCust *icp = GetInputCustom(hwnd);
|
InputCust *icp = GetInputCustom(hwnd);
|
||||||
HWND pappy = (HWND__ *)GetWindowLongPtr(hwnd,GWL_HWNDPARENT);
|
HWND pappy = (HWND__ *)GetWindowLongPtr(hwnd,GWLP_HWNDPARENT);
|
||||||
funky= hwnd;
|
funky= hwnd;
|
||||||
|
|
||||||
static HWND selectedItem = NULL;
|
static HWND selectedItem = NULL;
|
||||||
@ -1200,7 +1199,7 @@ static LRESULT CALLBACK HotInputCustomWndProc(HWND hwnd, UINT msg, WPARAM wParam
|
|||||||
|
|
||||||
icp->crForeGnd = ((~col) & 0x00ffffff);
|
icp->crForeGnd = ((~col) & 0x00ffffff);
|
||||||
icp->crBackGnd = col;
|
icp->crBackGnd = col;
|
||||||
SetWindowText(hwnd,temp);
|
SetWindowText(hwnd,_tFromChar(temp));
|
||||||
InvalidateRect(icp->hwnd, NULL, FALSE);
|
InvalidateRect(icp->hwnd, NULL, FALSE);
|
||||||
UpdateWindow(icp->hwnd);
|
UpdateWindow(icp->hwnd);
|
||||||
SendMessage(pappy,WM_USER+43,wParam,(LPARAM)hwnd);
|
SendMessage(pappy,WM_USER+43,wParam,(LPARAM)hwnd);
|
||||||
@ -1237,7 +1236,7 @@ static LRESULT CALLBACK HotInputCustomWndProc(HWND hwnd, UINT msg, WPARAM wParam
|
|||||||
|
|
||||||
icp->crForeGnd = ((~col) & 0x00ffffff);
|
icp->crForeGnd = ((~col) & 0x00ffffff);
|
||||||
icp->crBackGnd = col;
|
icp->crBackGnd = col;
|
||||||
SetWindowText(hwnd,temp);
|
SetWindowText(hwnd,_tFromChar(temp));
|
||||||
InvalidateRect(icp->hwnd, NULL, FALSE);
|
InvalidateRect(icp->hwnd, NULL, FALSE);
|
||||||
UpdateWindow(icp->hwnd);
|
UpdateWindow(icp->hwnd);
|
||||||
SendMessage(pappy,WM_USER+43,wParam,(LPARAM)hwnd);
|
SendMessage(pappy,WM_USER+43,wParam,(LPARAM)hwnd);
|
||||||
@ -1265,7 +1264,7 @@ static LRESULT CALLBACK HotInputCustomWndProc(HWND hwnd, UINT msg, WPARAM wParam
|
|||||||
}
|
}
|
||||||
icp->crForeGnd = ((~col) & 0x00ffffff);
|
icp->crForeGnd = ((~col) & 0x00ffffff);
|
||||||
icp->crBackGnd = col;
|
icp->crBackGnd = col;
|
||||||
SetWindowText(hwnd,temp);
|
SetWindowText(hwnd,_tFromChar(temp));
|
||||||
InvalidateRect(icp->hwnd, NULL, FALSE);
|
InvalidateRect(icp->hwnd, NULL, FALSE);
|
||||||
UpdateWindow(icp->hwnd);
|
UpdateWindow(icp->hwnd);
|
||||||
}
|
}
|
||||||
|
28
win32/_tfwopen.cpp
Normal file
28
win32/_tfwopen.cpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifdef UNICODE
|
||||||
|
#include <windows.h>
|
||||||
|
#include "_tfwopen.h"
|
||||||
|
|
||||||
|
Utf8ToWide::Utf8ToWide(const char *utf8Chars) {
|
||||||
|
int requiredChars = MultiByteToWideChar(CP_UTF8,0,utf8Chars,-1,wideChars,0);
|
||||||
|
wideChars = new wchar_t[requiredChars];
|
||||||
|
MultiByteToWideChar(CP_UTF8,0,utf8Chars,-1,wideChars,requiredChars);
|
||||||
|
}
|
||||||
|
|
||||||
|
WideToUtf8::WideToUtf8(const wchar_t *wideChars) {
|
||||||
|
int requiredChars = WideCharToMultiByte(CP_UTF8,0,wideChars,-1,utf8Chars,0,NULL,NULL);
|
||||||
|
utf8Chars = new char[requiredChars];
|
||||||
|
WideCharToMultiByte(CP_UTF8,0,wideChars,-1,utf8Chars,requiredChars,NULL,NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" FILE *_tfwopen(const char *filename, const char *mode ) {
|
||||||
|
wchar_t mode_w[30];
|
||||||
|
lstrcpyn(mode_w,Utf8ToWide(mode),29);
|
||||||
|
mode_w[29]=L'\0';
|
||||||
|
return _wfopen(Utf8ToWide(filename),mode_w);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" int _twremove(const char *filename ) {
|
||||||
|
return _wremove(Utf8ToWide(filename));
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // UNICODE
|
84
win32/_tfwopen.h
Normal file
84
win32/_tfwopen.h
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
#ifdef UNICODE
|
||||||
|
#ifndef _TFWOPEN_H
|
||||||
|
#define _TFWOPEN_H
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
FILE *_tfwopen(const char *filename, const char *mode );
|
||||||
|
int _twremove(const char *filename );
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
class Utf8ToWide {
|
||||||
|
private:
|
||||||
|
wchar_t *wideChars;
|
||||||
|
public:
|
||||||
|
Utf8ToWide(const char *utf8Chars);
|
||||||
|
~Utf8ToWide() { delete [] wideChars; }
|
||||||
|
operator wchar_t *() { return wideChars; }
|
||||||
|
};
|
||||||
|
|
||||||
|
class WideToUtf8 {
|
||||||
|
private:
|
||||||
|
char *utf8Chars;
|
||||||
|
public:
|
||||||
|
WideToUtf8(const wchar_t *wideChars);
|
||||||
|
~WideToUtf8() { delete [] utf8Chars; }
|
||||||
|
operator char *() { return utf8Chars; }
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
class u8nifstream: public std::ifstream
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void __CLR_OR_THIS_CALL open(const char *_Filename, ios_base::open_mode _Mode)
|
||||||
|
{
|
||||||
|
std::ifstream::open(Utf8ToWide(_Filename), (ios_base::openmode)_Mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
void __CLR_OR_THIS_CALL open(const wchar_t *_Filename, ios_base::open_mode _Mode)
|
||||||
|
{
|
||||||
|
std::ifstream::open(_Filename, (ios_base::openmode)_Mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
__CLR_OR_THIS_CALL u8nifstream()
|
||||||
|
: std::ifstream() {}
|
||||||
|
|
||||||
|
explicit __CLR_OR_THIS_CALL u8nifstream(const char *_Filename,
|
||||||
|
ios_base::openmode _Mode = ios_base::in,
|
||||||
|
int _Prot = (int)ios_base::_Openprot)
|
||||||
|
: std::ifstream(Utf8ToWide(_Filename),_Mode) {}
|
||||||
|
|
||||||
|
explicit __CLR_OR_THIS_CALL u8nifstream(const wchar_t *_Filename,
|
||||||
|
ios_base::openmode _Mode = ios_base::in,
|
||||||
|
int _Prot = (int)ios_base::_Openprot)
|
||||||
|
: std::ifstream(_Filename,_Mode,_Prot) {}
|
||||||
|
|
||||||
|
#ifdef _NATIVE_WCHAR_T_DEFINED
|
||||||
|
explicit __CLR_OR_THIS_CALL u8nifstream(const unsigned short *_Filename,
|
||||||
|
ios_base::openmode _Mode = ios_base::in,
|
||||||
|
int _Prot = (int)ios_base::_Openprot)
|
||||||
|
: std::ifstream(_Filename,_Mode,_Prot) {}
|
||||||
|
#endif /* _NATIVE_WCHAR_T_DEFINED */
|
||||||
|
|
||||||
|
explicit __CLR_OR_THIS_CALL u8nifstream(_Filet *_File)
|
||||||
|
: std::ifstream(_File) {}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#define ifstream u8nifstream
|
||||||
|
#endif // __cplusplus
|
||||||
|
|
||||||
|
#define fopen _tfwopen
|
||||||
|
#define remove _twremove
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // _TFWOPEN_H
|
@ -1,8 +1,11 @@
|
|||||||
Various software and tools are required to compile Snes9x on Windows:
|
Various software and tools are required to compile Snes9x on Windows:
|
||||||
|
|
||||||
|
NOTE: Unicode support requires a special zlib build - see the end of the zlib entry
|
||||||
|
|
||||||
- Microsoft Visual C++ 7.1 or Microsoft Visual C++ 6.0 SP5 with the
|
- Microsoft Visual C++ 7.1 or Microsoft Visual C++ 6.0 SP5 with the
|
||||||
latest Platform SDK, to compile all the C++ source code.
|
latest Platform SDK, to compile all the C++ source code.
|
||||||
The current official binary is compiled with Visual Studio 2008
|
The current official binary is compiled with Visual Studio 2008, you'll have to create
|
||||||
|
your own project file for earlier MSVC versions
|
||||||
|
|
||||||
- A recent DirectX SDK. The official binary is compiled against the June 2008 SDK.
|
- A recent DirectX SDK. The official binary is compiled against the June 2008 SDK.
|
||||||
|
|
||||||
@ -16,6 +19,9 @@ Various software and tools are required to compile Snes9x on Windows:
|
|||||||
listing will disable zip support.
|
listing will disable zip support.
|
||||||
(the zlib directory should reside at win32/../../zlib, i.e. 2 directories up, the
|
(the zlib directory should reside at win32/../../zlib, i.e. 2 directories up, the
|
||||||
lib file is expected in win32/../../zlib/lib)
|
lib file is expected in win32/../../zlib/lib)
|
||||||
|
If you want to build snes9x with unicode support you can use the project file in win32\zlib
|
||||||
|
to compile zlib - if you want to use the project files supplied with zlib you have to add
|
||||||
|
_tfwopen.h to their force include list
|
||||||
|
|
||||||
- libpng(optional) - Like zlib, this is a renamed libpng.lib, built against the same
|
- libpng(optional) - Like zlib, this is a renamed libpng.lib, built against the same
|
||||||
C runtime for the same reasons. Building your own is as simple as changing the runtime
|
C runtime for the same reasons. Building your own is as simple as changing the runtime
|
||||||
|
10081
win32/glext.h
Normal file
10081
win32/glext.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -93,6 +93,7 @@
|
|||||||
#define IDC_MOVIE_METADATA 1090
|
#define IDC_MOVIE_METADATA 1090
|
||||||
#define IDC_MULTICART_EDITA 1090
|
#define IDC_MULTICART_EDITA 1090
|
||||||
#define IDC_INRATEEDIT 1090
|
#define IDC_INRATEEDIT 1090
|
||||||
|
#define IDC_SHADER_HLSL_FILE 1090
|
||||||
#define IDC_PAUSEINTERVAL 1091
|
#define IDC_PAUSEINTERVAL 1091
|
||||||
#define IDC_UPRIGHT 1091
|
#define IDC_UPRIGHT 1091
|
||||||
#define IDC_MULTICART_BIOSEDIT 1091
|
#define IDC_MULTICART_BIOSEDIT 1091
|
||||||
@ -101,8 +102,10 @@
|
|||||||
#define IDC_MULTICART_EDITB 1092
|
#define IDC_MULTICART_EDITB 1092
|
||||||
#define IDC_PAUSESPIN 1093
|
#define IDC_PAUSESPIN 1093
|
||||||
#define IDC_DWNRIGHT 1093
|
#define IDC_DWNRIGHT 1093
|
||||||
|
#define IDC_SHADER_GLSL_VERTEX_FILE 1093
|
||||||
#define IDC_SYNCBYRESET 1094
|
#define IDC_SYNCBYRESET 1094
|
||||||
#define IDC_DOWN 1094
|
#define IDC_DOWN 1094
|
||||||
|
#define IDC_SHADER_GLSL_FRAGMENT_FILE 1094
|
||||||
#define IDC_SENDROM 1095
|
#define IDC_SENDROM 1095
|
||||||
#define IDC_DWNLEFT 1095
|
#define IDC_DWNLEFT 1095
|
||||||
#define IDC_ACTASSERVER 1096
|
#define IDC_ACTASSERVER 1096
|
||||||
@ -345,6 +348,11 @@
|
|||||||
#define IDC_INRATETEXT 3012
|
#define IDC_INRATETEXT 3012
|
||||||
#define IDC_SPIN_MAX_SKIP_DISP 3013
|
#define IDC_SPIN_MAX_SKIP_DISP 3013
|
||||||
#define IDC_SPIN_MAX_SKIP_DISP_FIXED 3014
|
#define IDC_SPIN_MAX_SKIP_DISP_FIXED 3014
|
||||||
|
#define IDC_SHADER_ENABLED 3015
|
||||||
|
#define IDC_SHADER_HLSL_BROWSE 3016
|
||||||
|
#define IDC_SHADER_GROUP 3017
|
||||||
|
#define IDC_SHADER_GLSL_VERTEX_BROWSE 3018
|
||||||
|
#define IDC_SHADER_GLSL_FRAGMENT_BROWSE 3019
|
||||||
#define ID_FILE_EXIT 40001
|
#define ID_FILE_EXIT 40001
|
||||||
#define ID_LANGUAGE_ENGLISH 40002
|
#define ID_LANGUAGE_ENGLISH 40002
|
||||||
#define ID_LANGUAGE_NEDERLANDS 40003
|
#define ID_LANGUAGE_NEDERLANDS 40003
|
||||||
@ -462,6 +470,7 @@
|
|||||||
#define ID_FILE_LOADMULTICART 40153
|
#define ID_FILE_LOADMULTICART 40153
|
||||||
#define ID_SOUND_16MS 40154
|
#define ID_SOUND_16MS 40154
|
||||||
#define ID_SOUND_32MS 40155
|
#define ID_SOUND_32MS 40155
|
||||||
|
#define ID_FILE_SAVE_SPC_DATA 40066
|
||||||
#define ID_SOUND_48MS 40156
|
#define ID_SOUND_48MS 40156
|
||||||
#define ID_SOUND_64MS 40157
|
#define ID_SOUND_64MS 40157
|
||||||
#define ID_SOUND_80MS 40158
|
#define ID_SOUND_80MS 40158
|
||||||
@ -479,8 +488,8 @@
|
|||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 151
|
#define _APS_NEXT_RESOURCE_VALUE 151
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40154
|
#define _APS_NEXT_COMMAND_VALUE 40156
|
||||||
#define _APS_NEXT_CONTROL_VALUE 3014
|
#define _APS_NEXT_CONTROL_VALUE 3018
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -81,14 +81,13 @@ BEGIN
|
|||||||
LTEXT "Input Rate:",IDC_INRATETEXT,14,74,46,11
|
LTEXT "Input Rate:",IDC_INRATETEXT,14,74,46,11
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_ROM_INFO DIALOG 0, 0, 233, 185
|
IDD_ROM_INFO DIALOGEX 0, 0, 233, 185
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Rom Info"
|
CAPTION "Rom Info"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,85,164,50,14
|
DEFPUSHBUTTON "OK",IDOK,85,164,50,14
|
||||||
EDITTEXT IDC_ROM_DATA,7,7,219,146,ES_MULTILINE | ES_READONLY
|
EDITTEXT IDC_ROM_DATA,7,7,219,153,ES_MULTILINE | ES_READONLY
|
||||||
LTEXT "",IDC_WARNINGS,7,145,219,15,SS_CENTERIMAGE
|
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_ABOUT DIALOGEX 0, 0, 232, 181
|
IDD_ABOUT DIALOGEX 0, 0, 232, 181
|
||||||
@ -174,13 +173,13 @@ BEGIN
|
|||||||
CONTROL "Sync By Reset",IDC_SYNCBYRESET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,90,174,15
|
CONTROL "Sync By Reset",IDC_SYNCBYRESET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,90,174,15
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_NEWDISPLAY DIALOGEX 0, 0, 353, 184
|
IDD_NEWDISPLAY DIALOGEX 0, 0, 353, 285
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION
|
||||||
CAPTION "Display Settings"
|
CAPTION "Display Settings"
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,239,163,50,14
|
DEFPUSHBUTTON "OK",IDOK,239,263,50,14
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,296,163,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,296,263,50,14
|
||||||
COMBOBOX IDC_OUTPUTMETHOD,68,17,101,38,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_OUTPUTMETHOD,68,17,101,38,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
CONTROL "Fullscreen",IDC_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,36,48,10
|
CONTROL "Fullscreen",IDC_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,36,48,10
|
||||||
CONTROL "Emulate Fullscreen",IDC_EMUFULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,47,75,10
|
CONTROL "Emulate Fullscreen",IDC_EMUFULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,47,75,10
|
||||||
@ -200,11 +199,15 @@ BEGIN
|
|||||||
LTEXT "Resolution",IDC_CURRMODE,187,71,41,8
|
LTEXT "Resolution",IDC_CURRMODE,187,71,41,8
|
||||||
COMBOBOX IDC_RESOLUTION,234,69,105,95,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_RESOLUTION,234,69,105,95,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
CONTROL "Enable Triple Buffering",IDC_DBLBUFFER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,86,87,10
|
CONTROL "Enable Triple Buffering",IDC_DBLBUFFER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,86,87,10
|
||||||
|
CONTROL "VSync",IDC_VSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,300,86,37,10
|
||||||
CONTROL "Transparency Effects",IDC_TRANS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,113,153,10
|
CONTROL "Transparency Effects",IDC_TRANS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,113,153,10
|
||||||
CONTROL "Hi Resolution Support",IDC_HIRES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,124,85,10
|
CONTROL "Hi Resolution Support",IDC_HIRES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,124,85,10
|
||||||
CONTROL "Extend Height of SNES Image",IDC_HEIGHT_EXTEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,135,111,10
|
CONTROL "Extend Height of SNES Image",IDC_HEIGHT_EXTEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,135,111,10
|
||||||
CONTROL "Display messages before applying filters",IDC_MESSAGES_IN_IMAGE,
|
CONTROL "Display messages before applying filters",IDC_MESSAGES_IN_IMAGE,
|
||||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,146,140,10
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,146,140,10
|
||||||
|
GROUPBOX "",IDC_SHADER_GROUP,8,162,338,97,0,WS_EX_TRANSPARENT
|
||||||
|
EDITTEXT IDC_SHADER_HLSL_FILE,13,184,306,14,ES_AUTOHSCROLL | WS_DISABLED
|
||||||
|
PUSHBUTTON "...",IDC_SHADER_HLSL_BROWSE,322,184,19,14,WS_DISABLED
|
||||||
GROUPBOX "Frame Skipping:",IDC_STATIC,7,113,167,46,0,WS_EX_TRANSPARENT
|
GROUPBOX "Frame Skipping:",IDC_STATIC,7,113,167,46,0,WS_EX_TRANSPARENT
|
||||||
GROUPBOX "SNES Image",IDC_STATIC,180,103,166,57,0,WS_EX_TRANSPARENT
|
GROUPBOX "SNES Image",IDC_STATIC,180,103,166,57,0,WS_EX_TRANSPARENT
|
||||||
GROUPBOX "Output Image Processing",IDC_STATIC,179,7,166,46,0,WS_EX_TRANSPARENT
|
GROUPBOX "Output Image Processing",IDC_STATIC,179,7,166,46,0,WS_EX_TRANSPARENT
|
||||||
@ -214,7 +217,14 @@ BEGIN
|
|||||||
LTEXT "Max skipped frames:",IDC_STATIC,62,126,67,8
|
LTEXT "Max skipped frames:",IDC_STATIC,62,126,67,8
|
||||||
LTEXT "Amount skipped:",IDC_STATIC,62,144,67,8
|
LTEXT "Amount skipped:",IDC_STATIC,62,144,67,8
|
||||||
LTEXT "Output Method",IDC_STATIC,10,19,51,11
|
LTEXT "Output Method",IDC_STATIC,10,19,51,11
|
||||||
CONTROL "VSync",IDC_VSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,300,86,37,10
|
CONTROL "Use Shader",IDC_SHADER_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,162,52,9
|
||||||
|
LTEXT "HLSL Effect File",IDC_STATIC,13,173,104,8
|
||||||
|
EDITTEXT IDC_SHADER_GLSL_VERTEX_FILE,13,213,306,14,ES_AUTOHSCROLL | WS_DISABLED
|
||||||
|
PUSHBUTTON "...",IDC_SHADER_GLSL_VERTEX_BROWSE,322,213,19,14,WS_DISABLED
|
||||||
|
LTEXT "GLSL vertex shader",IDC_STATIC,13,202,104,8
|
||||||
|
EDITTEXT IDC_SHADER_GLSL_FRAGMENT_FILE,13,240,306,14,ES_AUTOHSCROLL | WS_DISABLED
|
||||||
|
PUSHBUTTON "...",IDC_SHADER_GLSL_FRAGMENT_BROWSE,322,240,19,14,WS_DISABLED
|
||||||
|
LTEXT "GLSL fragment shader",IDC_STATIC,13,229,104,8
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_CHEATER DIALOGEX 0, 0, 262, 218
|
IDD_CHEATER DIALOGEX 0, 0, 262, 218
|
||||||
@ -582,7 +592,7 @@ BEGIN
|
|||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
RIGHTMARGIN, 346
|
RIGHTMARGIN, 346
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 177
|
BOTTOMMARGIN, 277
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_CHEATER, DIALOG
|
IDD_CHEATER, DIALOG
|
||||||
@ -845,6 +855,7 @@ BEGIN
|
|||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
POPUP "Save Other"
|
POPUP "Save Other"
|
||||||
BEGIN
|
BEGIN
|
||||||
|
MENUITEM "S&ave SPC Data", ID_FILE_SAVE_SPC_DATA
|
||||||
MENUITEM "Save Screenshot", ID_SAVESCREENSHOT
|
MENUITEM "Save Screenshot", ID_SAVESCREENSHOT
|
||||||
MENUITEM "Sa&ve S-RAM Data", ID_FILE_SAVE_SRAM_DATA, GRAYED
|
MENUITEM "Sa&ve S-RAM Data", ID_FILE_SAVE_SRAM_DATA, GRAYED
|
||||||
END
|
END
|
||||||
@ -937,7 +948,7 @@ BEGIN
|
|||||||
MENUITEM "&Full Screen\tAlt+Enter", ID_WINDOW_FULLSCREEN
|
MENUITEM "&Full Screen\tAlt+Enter", ID_WINDOW_FULLSCREEN
|
||||||
MENUITEM "&Stretch Image\tAlt+Backspace", 40032
|
MENUITEM "&Stretch Image\tAlt+Backspace", 40032
|
||||||
MENUITEM "&Maintain Aspect Ratio", 40123
|
MENUITEM "&Maintain Aspect Ratio", 40123
|
||||||
MENUITEM "Stretch with &Video Card", ID_WINDOW_VIDMEM
|
MENUITEM "&Bilinear Filtering", ID_WINDOW_VIDMEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
POPUP "&Language"
|
POPUP "&Language"
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -5,23 +5,44 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Snes9X", "snes9xw.vcproj",
|
|||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
C core|Win32 = C core|Win32
|
Debug Unicode|Win32 = Debug Unicode|Win32
|
||||||
|
Debug Unicode|x64 = Debug Unicode|x64
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
Debug+ASM|Win32 = Debug+ASM|Win32
|
Debug+ASM|Win32 = Debug+ASM|Win32
|
||||||
|
Debug+ASM|x64 = Debug+ASM|x64
|
||||||
|
Release Unicode|Win32 = Release Unicode|Win32
|
||||||
|
Release Unicode|x64 = Release Unicode|x64
|
||||||
Release|Win32 = Release|Win32
|
Release|Win32 = Release|Win32
|
||||||
|
Release|x64 = Release|x64
|
||||||
Release+ASM|Win32 = Release+ASM|Win32
|
Release+ASM|Win32 = Release+ASM|Win32
|
||||||
|
Release+ASM|x64 = Release+ASM|x64
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.C core|Win32.ActiveCfg = C core|Win32
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
|
||||||
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.C core|Win32.Build.0 = C core|Win32
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
|
||||||
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug|Win32.ActiveCfg = Debug|Win32
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug|Win32.Build.0 = Debug|Win32
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug|x64.Build.0 = Debug|x64
|
||||||
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug+ASM|Win32.ActiveCfg = Debug+ASM|Win32
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug+ASM|Win32.ActiveCfg = Debug+ASM|Win32
|
||||||
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug+ASM|Win32.Build.0 = Debug+ASM|Win32
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug+ASM|Win32.Build.0 = Debug+ASM|Win32
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug+ASM|x64.ActiveCfg = Debug+ASM|x64
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Debug+ASM|x64.Build.0 = Debug+ASM|x64
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release Unicode|x64.Build.0 = Release Unicode|x64
|
||||||
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release|Win32.ActiveCfg = Release|Win32
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release|Win32.Build.0 = Release|Win32
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release|x64.Build.0 = Release|x64
|
||||||
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release+ASM|Win32.ActiveCfg = Release+ASM|Win32
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release+ASM|Win32.ActiveCfg = Release+ASM|Win32
|
||||||
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release+ASM|Win32.Build.0 = Release+ASM|Win32
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release+ASM|Win32.Build.0 = Release+ASM|Win32
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release+ASM|x64.ActiveCfg = Release+ASM|x64
|
||||||
|
{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}.Release+ASM|x64.Build.0 = Release+ASM|x64
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
4324
win32/snes9xw.vcproj
4324
win32/snes9xw.vcproj
File diff suppressed because it is too large
Load Diff
@ -223,8 +223,8 @@ void S9xParseArg (char **argv, int &i, int argc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern char multiRomA [MAX_PATH]; // lazy, should put in sGUI and add init to {0} somewhere
|
extern TCHAR multiRomA [MAX_PATH]; // lazy, should put in sGUI and add init to {0} somewhere
|
||||||
extern char multiRomB [MAX_PATH];
|
extern TCHAR multiRomB [MAX_PATH];
|
||||||
|
|
||||||
void WinSetDefaultValues ()
|
void WinSetDefaultValues ()
|
||||||
{
|
{
|
||||||
@ -237,18 +237,6 @@ void WinSetDefaultValues ()
|
|||||||
GUI.ValidControllerOptions = 0xFFFF;
|
GUI.ValidControllerOptions = 0xFFFF;
|
||||||
GUI.IgnoreNextMouseMove = false;
|
GUI.IgnoreNextMouseMove = false;
|
||||||
|
|
||||||
//GUI.HideMenu = false;
|
|
||||||
/*GUI.window_size.left = 0;
|
|
||||||
GUI.window_size.right = 524;
|
|
||||||
GUI.window_size.top = 0;
|
|
||||||
GUI.window_size.bottom = 524;*/
|
|
||||||
/*GUI.FullscreenMode.width = 640;
|
|
||||||
GUI.FullscreenMode.height = 480;
|
|
||||||
GUI.FullscreenMode.depth = 16;
|
|
||||||
GUI.Scale = FILTER_NONE;
|
|
||||||
GUI.NextScale = FILTER_NONE;
|
|
||||||
GUI.ScaleHiRes = FILTER_NONE;
|
|
||||||
GUI.NextScaleHiRes = FILTER_NONE;*/
|
|
||||||
GUI.DoubleBuffered = false;
|
GUI.DoubleBuffered = false;
|
||||||
GUI.FullScreen = false;
|
GUI.FullScreen = false;
|
||||||
GUI.Stretch = false;
|
GUI.Stretch = false;
|
||||||
@ -261,30 +249,7 @@ void WinSetDefaultValues ()
|
|||||||
|
|
||||||
WinDeleteRecentGamesList ();
|
WinDeleteRecentGamesList ();
|
||||||
|
|
||||||
// ROM Options
|
|
||||||
//memset (&Settings, 0, sizeof (Settings));
|
|
||||||
|
|
||||||
//Settings.ForceLoROM = false;
|
|
||||||
//Settings.ForceInterleaved = false;
|
|
||||||
|
|
||||||
//Settings.ForceNotInterleaved = false;
|
|
||||||
//Settings.ForceInterleaved = false;
|
|
||||||
//Settings.ForceInterleaved2 = false;
|
|
||||||
|
|
||||||
//Settings.ForcePAL = false;
|
|
||||||
//Settings.ForceNTSC = false;
|
|
||||||
//Settings.ForceHeader = false;
|
|
||||||
//Settings.ForceNoHeader = false;
|
|
||||||
|
|
||||||
// Sound options
|
|
||||||
//Settings.SoundSync = FALSE;
|
|
||||||
//Settings.Mute = FALSE;
|
|
||||||
//Settings.SoundPlaybackRate = 32000;
|
|
||||||
//Settings.SixteenBitSound = TRUE;
|
|
||||||
//Settings.Stereo = TRUE;
|
|
||||||
//Settings.ReverseStereo = FALSE;
|
|
||||||
GUI.SoundChannelEnable=255;
|
GUI.SoundChannelEnable=255;
|
||||||
//GUI.FAMute = FALSE;
|
|
||||||
|
|
||||||
// Tracing options
|
// Tracing options
|
||||||
Settings.TraceDMA = false;
|
Settings.TraceDMA = false;
|
||||||
@ -300,15 +265,7 @@ void WinSetDefaultValues ()
|
|||||||
Settings.FrameTime = 16667;
|
Settings.FrameTime = 16667;
|
||||||
|
|
||||||
// CPU options
|
// CPU options
|
||||||
//Settings.HDMATimingHack = 100;
|
|
||||||
//Settings.Shutdown = false;
|
|
||||||
//Settings.ShutdownMaster = false;
|
|
||||||
//Settings.BlockInvalidVRAMAccess = true;
|
|
||||||
//Settings.DisableIRQ = false;
|
|
||||||
Settings.Paused = false;
|
Settings.Paused = false;
|
||||||
//Timings.H_Max = SNES_CYCLES_PER_SCANLINE;
|
|
||||||
//Timings.HBlankStart = (256 * Timings.H_Max) / SNES_HCOUNTER_MAX;
|
|
||||||
//Settings.SkipFrames = AUTO_FRAMERATE;
|
|
||||||
|
|
||||||
// ROM image and peripheral options
|
// ROM image and peripheral options
|
||||||
Settings.MultiPlayer5Master = false;
|
Settings.MultiPlayer5Master = false;
|
||||||
@ -316,26 +273,6 @@ void WinSetDefaultValues ()
|
|||||||
Settings.MouseMaster = false;
|
Settings.MouseMaster = false;
|
||||||
//Settings.SuperFX = false;
|
//Settings.SuperFX = false;
|
||||||
|
|
||||||
// SNES graphics options
|
|
||||||
//Settings.DisableGraphicWindows = false;
|
|
||||||
//Settings.DisableHDMA = false;
|
|
||||||
//GUI.HeightExtend = false;
|
|
||||||
//Settings.DisplayFrameRate = false;
|
|
||||||
// Settings.SixteenBit = true;
|
|
||||||
//Settings.Transparency = true;
|
|
||||||
//Settings.SupportHiRes = true;
|
|
||||||
//Settings.AutoDisplayMessages = false; // this port supports text display on post-rendered surface
|
|
||||||
|
|
||||||
//Settings.DisplayPressedKeys = 0;
|
|
||||||
//GUI.CurrentSaveSlot = 0;
|
|
||||||
//Settings.AutoSaveDelay = 15;
|
|
||||||
//Settings.ApplyCheats = true;
|
|
||||||
|
|
||||||
//Settings.TurboMode = false;
|
|
||||||
//Settings.TurboSkipFrames = 15;
|
|
||||||
//GUI.TurboModeToggle = true;
|
|
||||||
//Settings.AutoMaxSkipFrames = 1;
|
|
||||||
|
|
||||||
#ifdef NETPLAY_SUPPORT
|
#ifdef NETPLAY_SUPPORT
|
||||||
Settings.Port = 1996;
|
Settings.Port = 1996;
|
||||||
NetPlay.MaxFrameSkip = 10;
|
NetPlay.MaxFrameSkip = 10;
|
||||||
@ -344,9 +281,7 @@ void WinSetDefaultValues ()
|
|||||||
NPServer.SendROMImageOnConnect = false;
|
NPServer.SendROMImageOnConnect = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//GUI.FreezeFileDir [0] = 0;
|
|
||||||
Settings.TakeScreenshot=false;
|
Settings.TakeScreenshot=false;
|
||||||
//Settings.StretchScreenshots=1;
|
|
||||||
|
|
||||||
GUI.Language=0;
|
GUI.Language=0;
|
||||||
}
|
}
|
||||||
@ -367,7 +302,7 @@ static char rom_filename [MAX_PATH] = {0,};
|
|||||||
|
|
||||||
static bool S9xSaveConfigFile(ConfigFile &conf){
|
static bool S9xSaveConfigFile(ConfigFile &conf){
|
||||||
|
|
||||||
configMutex = CreateMutex(NULL, FALSE, "Snes9xConfigMutex");
|
configMutex = CreateMutex(NULL, FALSE, TEXT("Snes9xConfigMutex"));
|
||||||
int times = 0;
|
int times = 0;
|
||||||
DWORD waitVal = WAIT_TIMEOUT;
|
DWORD waitVal = WAIT_TIMEOUT;
|
||||||
while(waitVal == WAIT_TIMEOUT && ++times <= 150) // wait at most 15 seconds
|
while(waitVal == WAIT_TIMEOUT && ++times <= 150) // wait at most 15 seconds
|
||||||
@ -381,7 +316,7 @@ static bool S9xSaveConfigFile(ConfigFile &conf){
|
|||||||
// ensure previous config file is not lost if we crash while writing the new one
|
// ensure previous config file is not lost if we crash while writing the new one
|
||||||
std::string ftemp;
|
std::string ftemp;
|
||||||
{
|
{
|
||||||
CopyFile(fname.c_str(), (fname + ".autobak").c_str(), FALSE);
|
CopyFileA(fname.c_str(), (fname + ".autobak").c_str(), FALSE);
|
||||||
|
|
||||||
ftemp=S9xGetDirectory(DEFAULT_DIR);
|
ftemp=S9xGetDirectory(DEFAULT_DIR);
|
||||||
ftemp+=SLASH_STR "config_error";
|
ftemp+=SLASH_STR "config_error";
|
||||||
@ -457,7 +392,7 @@ const char* WinParseCommandLineAndLoadConfigFile (char *line)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configMutex = CreateMutex(NULL, FALSE, "Snes9xConfigMutex");
|
configMutex = CreateMutex(NULL, FALSE, TEXT("Snes9xConfigMutex"));
|
||||||
int times = 0;
|
int times = 0;
|
||||||
DWORD waitVal = WAIT_TIMEOUT;
|
DWORD waitVal = WAIT_TIMEOUT;
|
||||||
while(waitVal == WAIT_TIMEOUT && ++times <= 150) // wait at most 15 seconds
|
while(waitVal == WAIT_TIMEOUT && ++times <= 150) // wait at most 15 seconds
|
||||||
@ -484,7 +419,7 @@ const char* WinParseCommandLineAndLoadConfigFile (char *line)
|
|||||||
if(tempfile)
|
if(tempfile)
|
||||||
{
|
{
|
||||||
fclose(tempfile);
|
fclose(tempfile);
|
||||||
MoveFileEx((fname + ".autobak").c_str(), fname.c_str(), MOVEFILE_REPLACE_EXISTING|MOVEFILE_WRITE_THROUGH);
|
MoveFileExA((fname + ".autobak").c_str(), fname.c_str(), MOVEFILE_REPLACE_EXISTING|MOVEFILE_WRITE_THROUGH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
remove(ftemp.c_str());
|
remove(ftemp.c_str());
|
||||||
@ -611,8 +546,8 @@ struct ConfigItem
|
|||||||
if(size == 8) *(uint64*)addr = (uint64)conf.GetUInt(name, reinterpret_cast<uint32>(def));
|
if(size == 8) *(uint64*)addr = (uint64)conf.GetUInt(name, reinterpret_cast<uint32>(def));
|
||||||
break;
|
break;
|
||||||
case CIT_STRING:
|
case CIT_STRING:
|
||||||
strncpy((char*)addr, conf.GetString(name, reinterpret_cast<const char*>(def)), size-1);
|
lstrcpyn((TCHAR*)addr, _tFromChar(conf.GetString(name, reinterpret_cast<const char*>(def))), size-1);
|
||||||
((char*)addr)[size-1] = '\0';
|
((TCHAR*)addr)[size-1] = TEXT('\0');
|
||||||
break;
|
break;
|
||||||
case CIT_INVBOOL:
|
case CIT_INVBOOL:
|
||||||
case CIT_INVBOOLONOFF:
|
case CIT_INVBOOLONOFF:
|
||||||
@ -717,8 +652,8 @@ struct ConfigItem
|
|||||||
if(size == 8) conf.SetUInt(name, (uint32)(*(uint64*)addr), 10, comment);
|
if(size == 8) conf.SetUInt(name, (uint32)(*(uint64*)addr), 10, comment);
|
||||||
break;
|
break;
|
||||||
case CIT_STRING:
|
case CIT_STRING:
|
||||||
if((char*)addr)
|
if((TCHAR*)addr)
|
||||||
conf.SetString(name, (char*)addr, comment);
|
conf.SetString(name, std::string(_tToChar((TCHAR*)addr)), comment);
|
||||||
break;
|
break;
|
||||||
case CIT_INVBOOL:
|
case CIT_INVBOOL:
|
||||||
if(size == 1) conf.SetBool(name, 0==(*(uint8 *)addr), "TRUE","FALSE", comment);
|
if(size == 1) conf.SetBool(name, 0==(*(uint8 *)addr), "TRUE","FALSE", comment);
|
||||||
@ -771,7 +706,7 @@ struct ConfigItem
|
|||||||
|
|
||||||
std::vector<ConfigItem> configItems;
|
std::vector<ConfigItem> configItems;
|
||||||
// var must be a persistent variable. In the case of strings, it must point to a writeable character array.
|
// var must be a persistent variable. In the case of strings, it must point to a writeable character array.
|
||||||
#define AddItemC(name, var, def, comment, type) configItems.push_back(ConfigItem((const char*)(CATEGORY "::" name), (void*)(pint)(&var), sizeof(var), (void*)(pint)def, (const char*)comment, (ConfigItemType)type))
|
#define AddItemC(name, var, def, comment, type) configItems.push_back(ConfigItem((const char*)(CATEGORY "::" name), (void*)(&var), sizeof(var), (void*)(pint)def, (const char*)comment, (ConfigItemType)type))
|
||||||
#define AddItem(name, var, def, type) AddItemC(name,var,def,"",type)
|
#define AddItem(name, var, def, type) AddItemC(name,var,def,"",type)
|
||||||
#define AddUInt(name, var, def) AddItem(name,var,def,CIT_UINT)
|
#define AddUInt(name, var, def) AddItem(name,var,def,CIT_UINT)
|
||||||
#define AddInt(name, var, def) AddItem(name,var,def,CIT_INT)
|
#define AddInt(name, var, def) AddItem(name,var,def,CIT_INT)
|
||||||
@ -787,7 +722,7 @@ std::vector<ConfigItem> configItems;
|
|||||||
#define AddBool2C(name, var, def, comment) AddItemC(name,var,def,comment,CIT_BOOLONOFF)
|
#define AddBool2C(name, var, def, comment) AddItemC(name,var,def,comment,CIT_BOOLONOFF)
|
||||||
#define AddInvBoolC(name, var, def, comment) AddItemC(name,var,def,comment,CIT_INVBOOL)
|
#define AddInvBoolC(name, var, def, comment) AddItemC(name,var,def,comment,CIT_INVBOOL)
|
||||||
#define AddInvBool2C(name, var, def, comment) AddItemC(name,var,def,comment,CIT_INVBOOLONOFF)
|
#define AddInvBool2C(name, var, def, comment) AddItemC(name,var,def,comment,CIT_INVBOOLONOFF)
|
||||||
#define AddStringC(name, var, buflen, def, comment) configItems.push_back(ConfigItem((const char*)(CATEGORY "::" name), (void*)(pint)var, buflen, (void*)(pint)def, (const char*)comment, CIT_STRING))
|
#define AddStringC(name, var, buflen, def, comment) configItems.push_back(ConfigItem((const char*)(CATEGORY "::" name), (void*)var, buflen, (void*)(pint)def, (const char*)comment, CIT_STRING))
|
||||||
#define AddString(name, var, buflen, def) AddStringC(name, var, buflen, def, "")
|
#define AddString(name, var, buflen, def) AddStringC(name, var, buflen, def, "")
|
||||||
|
|
||||||
static char filterString [1024], filterString2 [1024], snapVerString [256];
|
static char filterString [1024], filterString2 [1024], snapVerString [256];
|
||||||
@ -901,8 +836,8 @@ void WinPostLoad(ConfigFile& conf)
|
|||||||
gap = true;
|
gap = true;
|
||||||
else if(gap)
|
else if(gap)
|
||||||
{
|
{
|
||||||
memmove(GUI.RecentGames[i-1], GUI.RecentGames[i], MAX_PATH);
|
memmove(GUI.RecentGames[i-1], GUI.RecentGames[i], MAX_PATH * sizeof(TCHAR));
|
||||||
*GUI.RecentGames[i] = '\0';
|
*GUI.RecentGames[i] = TEXT('\0');
|
||||||
gap = false;
|
gap = false;
|
||||||
i = -1;
|
i = -1;
|
||||||
}
|
}
|
||||||
@ -962,6 +897,10 @@ void WinRegisterConfigItems()
|
|||||||
AddUIntC("OutputMethod", GUI.outputMethod, 1, "0=DirectDraw, 1=Direct3D");
|
AddUIntC("OutputMethod", GUI.outputMethod, 1, "0=DirectDraw, 1=Direct3D");
|
||||||
AddUIntC("FilterType", GUI.Scale, 0, filterString);
|
AddUIntC("FilterType", GUI.Scale, 0, filterString);
|
||||||
AddUIntC("FilterHiRes", GUI.ScaleHiRes, 0, filterString2);
|
AddUIntC("FilterHiRes", GUI.ScaleHiRes, 0, filterString2);
|
||||||
|
AddBoolC("ShaderEnabled", GUI.shaderEnabled, false, "true to use pixel shader (if supported by output method)");
|
||||||
|
AddStringC("Direct3D:HLSLFileName", GUI.HLSLshaderFileName, MAX_PATH, "", "shader filename for Direct3D mode");
|
||||||
|
AddStringC("OpenGL:GLSLvertexFileName", GUI.GLSLvertexShaderFileName, MAX_PATH, "", "vertex shader filename for OpenGL mode");
|
||||||
|
AddStringC("OpenGL:GLSLfragmentFileName", GUI.GLSLfragmentShaderFileName, MAX_PATH, "", "fragment shader filename for OpenGL mode");
|
||||||
AddBoolC("ExtendHeight", GUI.HeightExtend, false, "true to display an extra 15 pixels at the bottom, which few games use. Also increases AVI output size from 256x224 to 256x240.");
|
AddBoolC("ExtendHeight", GUI.HeightExtend, false, "true to display an extra 15 pixels at the bottom, which few games use. Also increases AVI output size from 256x224 to 256x240.");
|
||||||
AddIntC("Window:Width", GUI.window_size.right, 512, "256=1x, 512=2x, 768=3x, 1024=4x, etc. (usually)");
|
AddIntC("Window:Width", GUI.window_size.right, 512, "256=1x, 512=2x, 768=3x, 1024=4x, etc. (usually)");
|
||||||
AddIntC("Window:Height", GUI.window_size.bottom, 448, "224=1x, 448=2x, 672=3x, 896=4x, etc. (usually)");
|
AddIntC("Window:Height", GUI.window_size.bottom, 448, "224=1x, 448=2x, 672=3x, 896=4x, etc. (usually)");
|
||||||
@ -1131,13 +1070,13 @@ void WinLockConfigFile ()
|
|||||||
STREAM fp;
|
STREAM fp;
|
||||||
if((fp=OPEN_STREAM(fname.c_str(), "r"))!=NULL){
|
if((fp=OPEN_STREAM(fname.c_str(), "r"))!=NULL){
|
||||||
CLOSE_STREAM(fp);
|
CLOSE_STREAM(fp);
|
||||||
locked_file=CreateFile(fname.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
locked_file=CreateFileA(fname.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||||
} else {
|
} else {
|
||||||
fname=S9xGetDirectory(DEFAULT_DIR);
|
fname=S9xGetDirectory(DEFAULT_DIR);
|
||||||
fname+=SLASH_STR "snes9x.cfg";
|
fname+=SLASH_STR "snes9x.cfg";
|
||||||
if((fp=OPEN_STREAM(fname.c_str(), "r"))!=NULL){
|
if((fp=OPEN_STREAM(fname.c_str(), "r"))!=NULL){
|
||||||
CLOSE_STREAM(fp);
|
CLOSE_STREAM(fp);
|
||||||
locked_file=CreateFile(fname.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
locked_file=CreateFileA(fname.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
869
win32/wglext.h
Normal file
869
win32/wglext.h
Normal file
@ -0,0 +1,869 @@
|
|||||||
|
#ifndef __wglext_h_
|
||||||
|
#define __wglext_h_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright (c) 2007-2010 The Khronos Group Inc.
|
||||||
|
**
|
||||||
|
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
** copy of this software and/or associated documentation files (the
|
||||||
|
** "Materials"), to deal in the Materials without restriction, including
|
||||||
|
** without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
** permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
** the following conditions:
|
||||||
|
**
|
||||||
|
** The above copyright notice and this permission notice shall be included
|
||||||
|
** in all copies or substantial portions of the Materials.
|
||||||
|
**
|
||||||
|
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Function declaration macros - to move into glplatform.h */
|
||||||
|
|
||||||
|
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||||
|
#define WIN32_LEAN_AND_MEAN 1
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef APIENTRY
|
||||||
|
#define APIENTRY
|
||||||
|
#endif
|
||||||
|
#ifndef APIENTRYP
|
||||||
|
#define APIENTRYP APIENTRY *
|
||||||
|
#endif
|
||||||
|
#ifndef GLAPI
|
||||||
|
#define GLAPI extern
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*************************************************************/
|
||||||
|
|
||||||
|
/* Header file version number */
|
||||||
|
/* wglext.h last updated 2010/02/10 */
|
||||||
|
/* Current version at http://www.opengl.org/registry/ */
|
||||||
|
#define WGL_WGLEXT_VERSION 18
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_buffer_region
|
||||||
|
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
|
||||||
|
#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
|
||||||
|
#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
|
||||||
|
#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_multisample
|
||||||
|
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
|
||||||
|
#define WGL_SAMPLES_ARB 0x2042
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_extensions_string
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pixel_format
|
||||||
|
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||||
|
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||||
|
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
||||||
|
#define WGL_ACCELERATION_ARB 0x2003
|
||||||
|
#define WGL_NEED_PALETTE_ARB 0x2004
|
||||||
|
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
||||||
|
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
||||||
|
#define WGL_SWAP_METHOD_ARB 0x2007
|
||||||
|
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
||||||
|
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
||||||
|
#define WGL_TRANSPARENT_ARB 0x200A
|
||||||
|
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
||||||
|
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
||||||
|
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
||||||
|
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
||||||
|
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
||||||
|
#define WGL_SHARE_DEPTH_ARB 0x200C
|
||||||
|
#define WGL_SHARE_STENCIL_ARB 0x200D
|
||||||
|
#define WGL_SHARE_ACCUM_ARB 0x200E
|
||||||
|
#define WGL_SUPPORT_GDI_ARB 0x200F
|
||||||
|
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
||||||
|
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||||
|
#define WGL_STEREO_ARB 0x2012
|
||||||
|
#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||||
|
#define WGL_COLOR_BITS_ARB 0x2014
|
||||||
|
#define WGL_RED_BITS_ARB 0x2015
|
||||||
|
#define WGL_RED_SHIFT_ARB 0x2016
|
||||||
|
#define WGL_GREEN_BITS_ARB 0x2017
|
||||||
|
#define WGL_GREEN_SHIFT_ARB 0x2018
|
||||||
|
#define WGL_BLUE_BITS_ARB 0x2019
|
||||||
|
#define WGL_BLUE_SHIFT_ARB 0x201A
|
||||||
|
#define WGL_ALPHA_BITS_ARB 0x201B
|
||||||
|
#define WGL_ALPHA_SHIFT_ARB 0x201C
|
||||||
|
#define WGL_ACCUM_BITS_ARB 0x201D
|
||||||
|
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
||||||
|
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
||||||
|
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
||||||
|
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
||||||
|
#define WGL_DEPTH_BITS_ARB 0x2022
|
||||||
|
#define WGL_STENCIL_BITS_ARB 0x2023
|
||||||
|
#define WGL_AUX_BUFFERS_ARB 0x2024
|
||||||
|
#define WGL_NO_ACCELERATION_ARB 0x2025
|
||||||
|
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
||||||
|
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||||
|
#define WGL_SWAP_EXCHANGE_ARB 0x2028
|
||||||
|
#define WGL_SWAP_COPY_ARB 0x2029
|
||||||
|
#define WGL_SWAP_UNDEFINED_ARB 0x202A
|
||||||
|
#define WGL_TYPE_RGBA_ARB 0x202B
|
||||||
|
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_make_current_read
|
||||||
|
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
|
||||||
|
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pbuffer
|
||||||
|
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
|
||||||
|
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
|
||||||
|
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
|
||||||
|
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
|
||||||
|
#define WGL_PBUFFER_LARGEST_ARB 0x2033
|
||||||
|
#define WGL_PBUFFER_WIDTH_ARB 0x2034
|
||||||
|
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
|
||||||
|
#define WGL_PBUFFER_LOST_ARB 0x2036
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_render_texture
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
|
||||||
|
#define WGL_TEXTURE_FORMAT_ARB 0x2072
|
||||||
|
#define WGL_TEXTURE_TARGET_ARB 0x2073
|
||||||
|
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
|
||||||
|
#define WGL_TEXTURE_RGB_ARB 0x2075
|
||||||
|
#define WGL_TEXTURE_RGBA_ARB 0x2076
|
||||||
|
#define WGL_NO_TEXTURE_ARB 0x2077
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
|
||||||
|
#define WGL_TEXTURE_1D_ARB 0x2079
|
||||||
|
#define WGL_TEXTURE_2D_ARB 0x207A
|
||||||
|
#define WGL_MIPMAP_LEVEL_ARB 0x207B
|
||||||
|
#define WGL_CUBE_MAP_FACE_ARB 0x207C
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
|
||||||
|
#define WGL_FRONT_LEFT_ARB 0x2083
|
||||||
|
#define WGL_FRONT_RIGHT_ARB 0x2084
|
||||||
|
#define WGL_BACK_LEFT_ARB 0x2085
|
||||||
|
#define WGL_BACK_RIGHT_ARB 0x2086
|
||||||
|
#define WGL_AUX0_ARB 0x2087
|
||||||
|
#define WGL_AUX1_ARB 0x2088
|
||||||
|
#define WGL_AUX2_ARB 0x2089
|
||||||
|
#define WGL_AUX3_ARB 0x208A
|
||||||
|
#define WGL_AUX4_ARB 0x208B
|
||||||
|
#define WGL_AUX5_ARB 0x208C
|
||||||
|
#define WGL_AUX6_ARB 0x208D
|
||||||
|
#define WGL_AUX7_ARB 0x208E
|
||||||
|
#define WGL_AUX8_ARB 0x208F
|
||||||
|
#define WGL_AUX9_ARB 0x2090
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pixel_format_float
|
||||||
|
#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_create_context
|
||||||
|
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
||||||
|
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
||||||
|
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||||
|
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||||
|
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
|
||||||
|
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
||||||
|
#define ERROR_INVALID_VERSION_ARB 0x2095
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_create_context_profile
|
||||||
|
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||||
|
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||||
|
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||||
|
#define ERROR_INVALID_PROFILE_ARB 0x2096
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_make_current_read
|
||||||
|
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_pixel_format
|
||||||
|
#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
|
||||||
|
#define WGL_DRAW_TO_WINDOW_EXT 0x2001
|
||||||
|
#define WGL_DRAW_TO_BITMAP_EXT 0x2002
|
||||||
|
#define WGL_ACCELERATION_EXT 0x2003
|
||||||
|
#define WGL_NEED_PALETTE_EXT 0x2004
|
||||||
|
#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
|
||||||
|
#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
|
||||||
|
#define WGL_SWAP_METHOD_EXT 0x2007
|
||||||
|
#define WGL_NUMBER_OVERLAYS_EXT 0x2008
|
||||||
|
#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
|
||||||
|
#define WGL_TRANSPARENT_EXT 0x200A
|
||||||
|
#define WGL_TRANSPARENT_VALUE_EXT 0x200B
|
||||||
|
#define WGL_SHARE_DEPTH_EXT 0x200C
|
||||||
|
#define WGL_SHARE_STENCIL_EXT 0x200D
|
||||||
|
#define WGL_SHARE_ACCUM_EXT 0x200E
|
||||||
|
#define WGL_SUPPORT_GDI_EXT 0x200F
|
||||||
|
#define WGL_SUPPORT_OPENGL_EXT 0x2010
|
||||||
|
#define WGL_DOUBLE_BUFFER_EXT 0x2011
|
||||||
|
#define WGL_STEREO_EXT 0x2012
|
||||||
|
#define WGL_PIXEL_TYPE_EXT 0x2013
|
||||||
|
#define WGL_COLOR_BITS_EXT 0x2014
|
||||||
|
#define WGL_RED_BITS_EXT 0x2015
|
||||||
|
#define WGL_RED_SHIFT_EXT 0x2016
|
||||||
|
#define WGL_GREEN_BITS_EXT 0x2017
|
||||||
|
#define WGL_GREEN_SHIFT_EXT 0x2018
|
||||||
|
#define WGL_BLUE_BITS_EXT 0x2019
|
||||||
|
#define WGL_BLUE_SHIFT_EXT 0x201A
|
||||||
|
#define WGL_ALPHA_BITS_EXT 0x201B
|
||||||
|
#define WGL_ALPHA_SHIFT_EXT 0x201C
|
||||||
|
#define WGL_ACCUM_BITS_EXT 0x201D
|
||||||
|
#define WGL_ACCUM_RED_BITS_EXT 0x201E
|
||||||
|
#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
|
||||||
|
#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
|
||||||
|
#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
|
||||||
|
#define WGL_DEPTH_BITS_EXT 0x2022
|
||||||
|
#define WGL_STENCIL_BITS_EXT 0x2023
|
||||||
|
#define WGL_AUX_BUFFERS_EXT 0x2024
|
||||||
|
#define WGL_NO_ACCELERATION_EXT 0x2025
|
||||||
|
#define WGL_GENERIC_ACCELERATION_EXT 0x2026
|
||||||
|
#define WGL_FULL_ACCELERATION_EXT 0x2027
|
||||||
|
#define WGL_SWAP_EXCHANGE_EXT 0x2028
|
||||||
|
#define WGL_SWAP_COPY_EXT 0x2029
|
||||||
|
#define WGL_SWAP_UNDEFINED_EXT 0x202A
|
||||||
|
#define WGL_TYPE_RGBA_EXT 0x202B
|
||||||
|
#define WGL_TYPE_COLORINDEX_EXT 0x202C
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_pbuffer
|
||||||
|
#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
|
||||||
|
#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
|
||||||
|
#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
|
||||||
|
#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
|
||||||
|
#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
|
||||||
|
#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
|
||||||
|
#define WGL_PBUFFER_LARGEST_EXT 0x2033
|
||||||
|
#define WGL_PBUFFER_WIDTH_EXT 0x2034
|
||||||
|
#define WGL_PBUFFER_HEIGHT_EXT 0x2035
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_depth_float
|
||||||
|
#define WGL_DEPTH_FLOAT_EXT 0x2040
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_3DFX_multisample
|
||||||
|
#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
|
||||||
|
#define WGL_SAMPLES_3DFX 0x2061
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_multisample
|
||||||
|
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
||||||
|
#define WGL_SAMPLES_EXT 0x2042
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_digital_video_control
|
||||||
|
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
|
||||||
|
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
|
||||||
|
#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
|
||||||
|
#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_gamma
|
||||||
|
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
|
||||||
|
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_genlock
|
||||||
|
#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
|
||||||
|
#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045
|
||||||
|
#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046
|
||||||
|
#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047
|
||||||
|
#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
|
||||||
|
#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
|
||||||
|
#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
|
||||||
|
#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
|
||||||
|
#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_image_buffer
|
||||||
|
#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
|
||||||
|
#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_swap_frame_lock
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_render_depth_texture
|
||||||
|
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
|
||||||
|
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
|
||||||
|
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
|
||||||
|
#define WGL_DEPTH_COMPONENT_NV 0x20A7
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_render_texture_rectangle
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
|
||||||
|
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ATI_pixel_format_float
|
||||||
|
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_float_buffer
|
||||||
|
#define WGL_FLOAT_COMPONENTS_NV 0x20B0
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
|
||||||
|
#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
|
||||||
|
#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
|
||||||
|
#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
|
||||||
|
#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_3DL_stereo_control
|
||||||
|
#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
|
||||||
|
#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
|
||||||
|
#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
|
||||||
|
#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_pixel_format_packed_float
|
||||||
|
#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_framebuffer_sRGB
|
||||||
|
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_present_video
|
||||||
|
#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_video_out
|
||||||
|
#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0
|
||||||
|
#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1
|
||||||
|
#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2
|
||||||
|
#define WGL_VIDEO_OUT_COLOR_NV 0x20C3
|
||||||
|
#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||||
|
#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||||
|
#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||||
|
#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||||
|
#define WGL_VIDEO_OUT_FRAME 0x20C8
|
||||||
|
#define WGL_VIDEO_OUT_FIELD_1 0x20C9
|
||||||
|
#define WGL_VIDEO_OUT_FIELD_2 0x20CA
|
||||||
|
#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB
|
||||||
|
#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_swap_group
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_gpu_affinity
|
||||||
|
#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
|
||||||
|
#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_AMD_gpu_association
|
||||||
|
#define WGL_GPU_VENDOR_AMD 0x1F00
|
||||||
|
#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
|
||||||
|
#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||||
|
#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||||
|
#define WGL_GPU_RAM_AMD 0x21A3
|
||||||
|
#define WGL_GPU_CLOCK_AMD 0x21A4
|
||||||
|
#define WGL_GPU_NUM_PIPES_AMD 0x21A5
|
||||||
|
#define WGL_GPU_NUM_SIMD_AMD 0x21A6
|
||||||
|
#define WGL_GPU_NUM_RB_AMD 0x21A7
|
||||||
|
#define WGL_GPU_NUM_SPI_AMD 0x21A8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NV_video_capture
|
||||||
|
#define WGL_UNIQUE_ID_NV 0x20CE
|
||||||
|
#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NV_copy_image
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************/
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pbuffer
|
||||||
|
DECLARE_HANDLE(HPBUFFERARB);
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_pbuffer
|
||||||
|
DECLARE_HANDLE(HPBUFFEREXT);
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_present_video
|
||||||
|
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_video_output
|
||||||
|
DECLARE_HANDLE(HPVIDEODEV);
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_gpu_affinity
|
||||||
|
DECLARE_HANDLE(HPGPUNV);
|
||||||
|
DECLARE_HANDLE(HGPUNV);
|
||||||
|
|
||||||
|
typedef struct _GPU_DEVICE {
|
||||||
|
DWORD cb;
|
||||||
|
CHAR DeviceName[32];
|
||||||
|
CHAR DeviceString[128];
|
||||||
|
DWORD Flags;
|
||||||
|
RECT rcVirtualScreen;
|
||||||
|
} GPU_DEVICE, *PGPU_DEVICE;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_video_capture
|
||||||
|
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_buffer_region
|
||||||
|
#define WGL_ARB_buffer_region 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType);
|
||||||
|
extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion);
|
||||||
|
extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height);
|
||||||
|
extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
|
||||||
|
typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_multisample
|
||||||
|
#define WGL_ARB_multisample 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_extensions_string
|
||||||
|
#define WGL_ARB_extensions_string 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern const char * WINAPI wglGetExtensionsStringARB (HDC hdc);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pixel_format
|
||||||
|
#define WGL_ARB_pixel_format 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||||
|
extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||||
|
extern BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_make_current_read
|
||||||
|
#define WGL_ARB_make_current_read 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||||
|
extern HDC WINAPI wglGetCurrentReadDCARB (void);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||||
|
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pbuffer
|
||||||
|
#define WGL_ARB_pbuffer 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||||
|
extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer);
|
||||||
|
extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC);
|
||||||
|
extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer);
|
||||||
|
extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||||
|
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
|
||||||
|
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_render_texture
|
||||||
|
#define WGL_ARB_render_texture 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
||||||
|
extern BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
||||||
|
extern BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pixel_format_float
|
||||||
|
#define WGL_ARB_pixel_format_float 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_create_context
|
||||||
|
#define WGL_ARB_create_context 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_create_context_profile
|
||||||
|
#define WGL_ARB_create_context_profile 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_display_color_table
|
||||||
|
#define WGL_EXT_display_color_table 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id);
|
||||||
|
extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length);
|
||||||
|
extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id);
|
||||||
|
extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||||
|
typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);
|
||||||
|
typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||||
|
typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_extensions_string
|
||||||
|
#define WGL_EXT_extensions_string 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern const char * WINAPI wglGetExtensionsStringEXT (void);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_make_current_read
|
||||||
|
#define WGL_EXT_make_current_read 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||||
|
extern HDC WINAPI wglGetCurrentReadDCEXT (void);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||||
|
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_pbuffer
|
||||||
|
#define WGL_EXT_pbuffer 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||||
|
extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer);
|
||||||
|
extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||||
|
extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer);
|
||||||
|
extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||||
|
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
|
||||||
|
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_pixel_format
|
||||||
|
#define WGL_EXT_pixel_format 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||||
|
extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||||
|
extern BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_swap_control
|
||||||
|
#define WGL_EXT_swap_control 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglSwapIntervalEXT (int interval);
|
||||||
|
extern int WINAPI wglGetSwapIntervalEXT (void);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||||
|
typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_depth_float
|
||||||
|
#define WGL_EXT_depth_float 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_vertex_array_range
|
||||||
|
#define WGL_NV_vertex_array_range 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern void* WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||||
|
extern void WINAPI wglFreeMemoryNV (void *pointer);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef void* (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||||
|
typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_3DFX_multisample
|
||||||
|
#define WGL_3DFX_multisample 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_multisample
|
||||||
|
#define WGL_EXT_multisample 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_OML_sync_control
|
||||||
|
#define WGL_OML_sync_control 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||||
|
extern BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator);
|
||||||
|
extern INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||||
|
extern INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||||
|
extern BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||||
|
extern BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator);
|
||||||
|
typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||||
|
typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_digital_video_control
|
||||||
|
#define WGL_I3D_digital_video_control 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
||||||
|
extern BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_gamma
|
||||||
|
#define WGL_I3D_gamma 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
||||||
|
extern BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
||||||
|
extern BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
||||||
|
extern BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_genlock
|
||||||
|
#define WGL_I3D_genlock 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglEnableGenlockI3D (HDC hDC);
|
||||||
|
extern BOOL WINAPI wglDisableGenlockI3D (HDC hDC);
|
||||||
|
extern BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag);
|
||||||
|
extern BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource);
|
||||||
|
extern BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource);
|
||||||
|
extern BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge);
|
||||||
|
extern BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge);
|
||||||
|
extern BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate);
|
||||||
|
extern BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate);
|
||||||
|
extern BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay);
|
||||||
|
extern BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay);
|
||||||
|
extern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_image_buffer
|
||||||
|
#define WGL_I3D_image_buffer 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags);
|
||||||
|
extern BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress);
|
||||||
|
extern BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
||||||
|
extern BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_swap_frame_lock
|
||||||
|
#define WGL_I3D_swap_frame_lock 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglEnableFrameLockI3D (void);
|
||||||
|
extern BOOL WINAPI wglDisableFrameLockI3D (void);
|
||||||
|
extern BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag);
|
||||||
|
extern BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_swap_frame_usage
|
||||||
|
#define WGL_I3D_swap_frame_usage 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglGetFrameUsageI3D (float *pUsage);
|
||||||
|
extern BOOL WINAPI wglBeginFrameTrackingI3D (void);
|
||||||
|
extern BOOL WINAPI wglEndFrameTrackingI3D (void);
|
||||||
|
extern BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ATI_pixel_format_float
|
||||||
|
#define WGL_ATI_pixel_format_float 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_float_buffer
|
||||||
|
#define WGL_NV_float_buffer 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_3DL_stereo_control
|
||||||
|
#define WGL_3DL_stereo_control 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_pixel_format_packed_float
|
||||||
|
#define WGL_EXT_pixel_format_packed_float 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_framebuffer_sRGB
|
||||||
|
#define WGL_EXT_framebuffer_sRGB 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_present_video
|
||||||
|
#define WGL_NV_present_video 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern int WINAPI wglEnumerateVideoDevicesNV (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
||||||
|
extern BOOL WINAPI wglBindVideoDeviceNV (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
||||||
|
extern BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_video_output
|
||||||
|
#define WGL_NV_video_output 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
||||||
|
extern BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice);
|
||||||
|
extern BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||||
|
extern BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||||
|
extern BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
||||||
|
extern BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_swap_group
|
||||||
|
#define WGL_NV_swap_group 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group);
|
||||||
|
extern BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier);
|
||||||
|
extern BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier);
|
||||||
|
extern BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
||||||
|
extern BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count);
|
||||||
|
extern BOOL WINAPI wglResetFrameCountNV (HDC hDC);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_gpu_affinity
|
||||||
|
#define WGL_NV_gpu_affinity 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu);
|
||||||
|
extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||||
|
extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList);
|
||||||
|
extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||||
|
extern BOOL WINAPI wglDeleteDCNV (HDC hdc);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||||
|
typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_AMD_gpu_association
|
||||||
|
#define WGL_AMD_gpu_association 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids);
|
||||||
|
extern INT WINAPI wglGetGPUInfoAMD (UINT id, int property, GLenum dataType, UINT size, void *data);
|
||||||
|
extern UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc);
|
||||||
|
extern HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id);
|
||||||
|
extern HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList);
|
||||||
|
extern BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc);
|
||||||
|
extern BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc);
|
||||||
|
extern HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void);
|
||||||
|
extern VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids);
|
||||||
|
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data);
|
||||||
|
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
|
||||||
|
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
|
||||||
|
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
|
||||||
|
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
|
||||||
|
typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_video_capture
|
||||||
|
#define WGL_NV_video_capture 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
||||||
|
extern UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
||||||
|
extern BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||||
|
extern BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
||||||
|
extern BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
||||||
|
typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_copy_image
|
||||||
|
#define WGL_NV_copy_image 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@ -284,31 +284,19 @@ const char *S9xGetFilename (const char *ex, enum s9x_getdirtype dirtype)
|
|||||||
return (filename);
|
return (filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
const void S9xGetLastDirectory (char* buffer, int buf_len)
|
#define IS_SLASH(x) ((x) == TEXT('\\') || (x) == TEXT('/'))
|
||||||
{
|
static TCHAR startDirectory [PATH_MAX];
|
||||||
if(buf_len <= 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
GetCurrentDirectory(buf_len, buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define IS_SLASH(x) ((x) == '\\' || (x) == '/')
|
|
||||||
static char startDirectory [PATH_MAX];
|
|
||||||
static bool startDirectoryValid = false;
|
static bool startDirectoryValid = false;
|
||||||
|
|
||||||
const char *S9xGetDirectory (enum s9x_getdirtype dirtype)
|
const TCHAR *S9xGetDirectoryT (enum s9x_getdirtype dirtype)
|
||||||
{
|
{
|
||||||
// _fullpath
|
|
||||||
if(!startDirectoryValid)
|
if(!startDirectoryValid)
|
||||||
{
|
{
|
||||||
// directory from which the executable was launched
|
|
||||||
// GetCurrentDirectory(PATH_MAX, startDirectory);
|
|
||||||
|
|
||||||
// directory of the executable's location:
|
// directory of the executable's location:
|
||||||
GetModuleFileName(NULL, startDirectory, PATH_MAX);
|
GetModuleFileName(NULL, startDirectory, PATH_MAX);
|
||||||
for(int i=strlen(startDirectory); i>=0; i--){
|
for(int i=lstrlen(startDirectory); i>=0; i--){
|
||||||
if(IS_SLASH(startDirectory[i])){
|
if(IS_SLASH(startDirectory[i])){
|
||||||
startDirectory[i]='\0';
|
startDirectory[i]=TEXT('\0');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -318,7 +306,7 @@ const char *S9xGetDirectory (enum s9x_getdirtype dirtype)
|
|||||||
|
|
||||||
SetCurrentDirectory(startDirectory); // makes sure relative paths are relative to the application's location
|
SetCurrentDirectory(startDirectory); // makes sure relative paths are relative to the application's location
|
||||||
|
|
||||||
const char* rv = startDirectory;
|
const TCHAR* rv = startDirectory;
|
||||||
|
|
||||||
switch(dirtype){
|
switch(dirtype){
|
||||||
default:
|
default:
|
||||||
@ -356,13 +344,13 @@ const char *S9xGetDirectory (enum s9x_getdirtype dirtype)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ROMFILENAME_DIR: {
|
case ROMFILENAME_DIR: {
|
||||||
static char filename [PATH_MAX];
|
static TCHAR filename [PATH_MAX];
|
||||||
strcpy(filename, Memory.ROMFilename);
|
lstrcpy(filename, _tFromChar(Memory.ROMFilename));
|
||||||
if(!filename[0])
|
if(!filename[0])
|
||||||
rv = GUI.RomDir;
|
rv = GUI.RomDir;
|
||||||
for(int i=strlen(filename); i>=0; i--){
|
for(int i=lstrlen(filename); i>=0; i--){
|
||||||
if(IS_SLASH(filename[i])){
|
if(IS_SLASH(filename[i])){
|
||||||
filename[i]='\0';
|
filename[i]=TEXT('\0');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -371,35 +359,18 @@ const char *S9xGetDirectory (enum s9x_getdirtype dirtype)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir(rv);
|
_tmkdir(rv);
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
///*extern "C"*/ const char *S9xGetFilename (const char *e)
|
const char *S9xGetDirectory (enum s9x_getdirtype dirtype)
|
||||||
//{
|
{
|
||||||
// static char filename [_MAX_PATH + 1];
|
static char path[PATH_MAX]={0};
|
||||||
// char drive [_MAX_DRIVE + 1];
|
strncpy(path,_tToChar(S9xGetDirectoryT(dirtype)),PATH_MAX-1);
|
||||||
// char dir [_MAX_DIR + 1];
|
|
||||||
// char fname [_MAX_FNAME + 1];
|
return path;
|
||||||
// char ext [_MAX_EXT + 1];
|
}
|
||||||
//
|
|
||||||
// if (strlen (GUI.FreezeFileDir))
|
|
||||||
// {
|
|
||||||
// _splitpath (Memory.ROMFilename, drive, dir, fname, ext);
|
|
||||||
// strcpy (filename, GUI.FreezeFileDir);
|
|
||||||
// strcat (filename, TEXT("\\"));
|
|
||||||
// strcat (filename, fname);
|
|
||||||
// strcat (filename, e);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// _splitpath (Memory.ROMFilename, drive, dir, fname, ext);
|
|
||||||
// _makepath (filename, drive, dir, fname, e);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return (filename);
|
|
||||||
//}
|
|
||||||
|
|
||||||
const char *S9xGetFilenameInc (const char *e, enum s9x_getdirtype dirtype)
|
const char *S9xGetFilenameInc (const char *e, enum s9x_getdirtype dirtype)
|
||||||
{
|
{
|
||||||
@ -488,17 +459,17 @@ void S9xMessage (int type, int, const char *str)
|
|||||||
case S9X_WARNING:
|
case S9X_WARNING:
|
||||||
fprintf(stdout, "%s\n", str);
|
fprintf(stdout, "%s\n", str);
|
||||||
if(Settings.StopEmulation)
|
if(Settings.StopEmulation)
|
||||||
MessageBox(GUI.hWnd, str, "Warning", MB_OK | MB_ICONWARNING);
|
MessageBoxA(GUI.hWnd, str, "Warning", MB_OK | MB_ICONWARNING);
|
||||||
break;
|
break;
|
||||||
case S9X_ERROR:
|
case S9X_ERROR:
|
||||||
fprintf(stderr, "%s\n", str);
|
fprintf(stderr, "%s\n", str);
|
||||||
if(Settings.StopEmulation)
|
if(Settings.StopEmulation)
|
||||||
MessageBox(GUI.hWnd, str, "Error", MB_OK | MB_ICONERROR);
|
MessageBoxA(GUI.hWnd, str, "Error", MB_OK | MB_ICONERROR);
|
||||||
break;
|
break;
|
||||||
case S9X_FATAL_ERROR:
|
case S9X_FATAL_ERROR:
|
||||||
fprintf(stderr, "%s\n", str);
|
fprintf(stderr, "%s\n", str);
|
||||||
if(Settings.StopEmulation)
|
if(Settings.StopEmulation)
|
||||||
MessageBox(GUI.hWnd, str, "Fatal Error", MB_OK | MB_ICONERROR);
|
MessageBoxA(GUI.hWnd, str, "Fatal Error", MB_OK | MB_ICONERROR);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stdout, "%s\n", str);
|
fprintf(stdout, "%s\n", str);
|
||||||
@ -506,24 +477,6 @@ void S9xMessage (int type, int, const char *str)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*unsigned long _interval = 10;
|
|
||||||
long _buffernos = 4;
|
|
||||||
long _blocksize = 4400;
|
|
||||||
long _samplecount = 440;
|
|
||||||
long _maxsamplecount = 0;
|
|
||||||
long _buffersize = 0;
|
|
||||||
|
|
||||||
bool StartPlaying = false;
|
|
||||||
DWORD _lastblock = 0;
|
|
||||||
bool8 pending_setup = false;
|
|
||||||
long pending_rate = 0;
|
|
||||||
bool8 pending_16bit = false;
|
|
||||||
bool8 pending_stereo = false;*/
|
|
||||||
extern uint8 *syncSoundBuffer;
|
|
||||||
|
|
||||||
//static bool8 block_signal = FALSE;
|
|
||||||
//static volatile bool8 pending_signal = FALSE;
|
|
||||||
|
|
||||||
extern unsigned long START;
|
extern unsigned long START;
|
||||||
|
|
||||||
void S9xSyncSpeed( void)
|
void S9xSyncSpeed( void)
|
||||||
@ -644,7 +597,7 @@ void S9xSyncSpeed( void)
|
|||||||
SkipFrames = Settings.TurboSkipFrames;
|
SkipFrames = Settings.TurboSkipFrames;
|
||||||
else
|
else
|
||||||
SkipFrames = (Settings.SkipFrames == AUTO_FRAMERATE) ? 0 : Settings.SkipFrames;
|
SkipFrames = (Settings.SkipFrames == AUTO_FRAMERATE) ? 0 : Settings.SkipFrames;
|
||||||
if (++IPPU.FrameSkip >= SkipFrames)
|
if (IPPU.FrameSkip++ >= SkipFrames)
|
||||||
{
|
{
|
||||||
IPPU.FrameSkip = 0;
|
IPPU.FrameSkip = 0;
|
||||||
IPPU.SkippedFrames = 0;
|
IPPU.SkippedFrames = 0;
|
||||||
@ -665,7 +618,7 @@ const char *S9xBasename (const char *f)
|
|||||||
return (p + 1);
|
return (p + 1);
|
||||||
|
|
||||||
#ifdef __DJGPP
|
#ifdef __DJGPP
|
||||||
if (p = strrchr (f, SLASH_CHAR))
|
if (p = _tcsrchr (f, SLASH_CHAR))
|
||||||
return (p + 1);
|
return (p + 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1035,7 +988,7 @@ void InitSnes9X( void)
|
|||||||
S9xGraphicsInit();
|
S9xGraphicsInit();
|
||||||
|
|
||||||
InitializeCriticalSection(&GUI.SoundCritSect);
|
InitializeCriticalSection(&GUI.SoundCritSect);
|
||||||
CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||||
|
|
||||||
S9xInitAPU();
|
S9xInitAPU();
|
||||||
|
|
||||||
@ -1240,7 +1193,7 @@ void ResampleTo8000HzS8(uint8* input, uint8*output,int output_samples)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void DoAVIOpen(const char* filename)
|
void DoAVIOpen(const TCHAR* filename)
|
||||||
{
|
{
|
||||||
// close current instance
|
// close current instance
|
||||||
if(GUI.AVIOut)
|
if(GUI.AVIOut)
|
||||||
@ -1442,4 +1395,4 @@ void DoAVIVideoFrame(SSurface* source_surface, int Width, int Height/*, bool8 si
|
|||||||
|
|
||||||
AVIAddSoundSamples(avi_sound_buffer, avi_sound_samples_per_update, GUI.AVIOut);
|
AVIAddSoundSamples(avi_sound_buffer, avi_sound_samples_per_update, GUI.AVIOut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,6 +186,7 @@
|
|||||||
#include "win32_display.h"
|
#include "win32_display.h"
|
||||||
#include "CDirect3D.h"
|
#include "CDirect3D.h"
|
||||||
#include "CDirectDraw.h"
|
#include "CDirectDraw.h"
|
||||||
|
#include "COpenGL.h"
|
||||||
#include "IS9xDisplayOutput.h"
|
#include "IS9xDisplayOutput.h"
|
||||||
|
|
||||||
#include "../filter/hq2x.h"
|
#include "../filter/hq2x.h"
|
||||||
@ -194,6 +195,7 @@
|
|||||||
// available display output methods
|
// available display output methods
|
||||||
CDirect3D Direct3D;
|
CDirect3D Direct3D;
|
||||||
CDirectDraw DirectDraw;
|
CDirectDraw DirectDraw;
|
||||||
|
COpenGL OpenGL;
|
||||||
|
|
||||||
// Interface used to access the display output
|
// Interface used to access the display output
|
||||||
IS9xDisplayOutput *S9xDisplayOutput=&Direct3D;
|
IS9xDisplayOutput *S9xDisplayOutput=&Direct3D;
|
||||||
@ -231,12 +233,16 @@ bool WinDisplayReset(void)
|
|||||||
{
|
{
|
||||||
S9xDisplayOutput->DeInitialize();
|
S9xDisplayOutput->DeInitialize();
|
||||||
switch(GUI.outputMethod) {
|
switch(GUI.outputMethod) {
|
||||||
|
default:
|
||||||
case DIRECT3D:
|
case DIRECT3D:
|
||||||
S9xDisplayOutput = &Direct3D;
|
S9xDisplayOutput = &Direct3D;
|
||||||
break;
|
break;
|
||||||
case DIRECTDRAW:
|
case DIRECTDRAW:
|
||||||
S9xDisplayOutput = &DirectDraw;
|
S9xDisplayOutput = &DirectDraw;
|
||||||
break;
|
break;
|
||||||
|
case OPENGL:
|
||||||
|
S9xDisplayOutput = &OpenGL;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if(S9xDisplayOutput->Initialize(GUI.hWnd)) {
|
if(S9xDisplayOutput->Initialize(GUI.hWnd)) {
|
||||||
S9xGraphicsDeinit();
|
S9xGraphicsDeinit();
|
||||||
@ -255,6 +261,56 @@ void WinDisplayApplyChanges()
|
|||||||
S9xDisplayOutput->ApplyDisplayChanges();
|
S9xDisplayOutput->ApplyDisplayChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RECT CalculateDisplayRect(unsigned int sourceWidth,unsigned int sourceHeight,
|
||||||
|
unsigned int displayWidth,unsigned int displayHeight)
|
||||||
|
{
|
||||||
|
float xFactor;
|
||||||
|
float yFactor;
|
||||||
|
float minFactor;
|
||||||
|
float renderWidthCalc,renderHeightCalc;
|
||||||
|
int hExtend = GUI.HeightExtend ? SNES_HEIGHT_EXTENDED : SNES_HEIGHT;
|
||||||
|
float snesAspect = (float)GUI.AspectWidth/hExtend;
|
||||||
|
RECT drawRect;
|
||||||
|
|
||||||
|
if(GUI.Stretch) {
|
||||||
|
if(GUI.AspectRatio) {
|
||||||
|
//fix for hi-res images with FILTER_NONE
|
||||||
|
//where we need to correct the aspect ratio
|
||||||
|
renderWidthCalc = (float)sourceWidth;
|
||||||
|
renderHeightCalc = (float)sourceHeight;
|
||||||
|
if(renderWidthCalc/renderHeightCalc>snesAspect)
|
||||||
|
renderWidthCalc = renderHeightCalc * snesAspect;
|
||||||
|
else if(renderWidthCalc/renderHeightCalc<snesAspect)
|
||||||
|
renderHeightCalc = renderWidthCalc / snesAspect;
|
||||||
|
|
||||||
|
xFactor = (float)displayWidth / renderWidthCalc;
|
||||||
|
yFactor = (float)displayHeight / renderHeightCalc;
|
||||||
|
minFactor = xFactor < yFactor ? xFactor : yFactor;
|
||||||
|
|
||||||
|
drawRect.right = (LONG)(renderWidthCalc * minFactor);
|
||||||
|
drawRect.bottom = (LONG)(renderHeightCalc * minFactor);
|
||||||
|
|
||||||
|
drawRect.left = (displayWidth - drawRect.right) / 2;
|
||||||
|
drawRect.top = (displayHeight - drawRect.bottom) / 2;
|
||||||
|
drawRect.right += drawRect.left;
|
||||||
|
drawRect.bottom += drawRect.top;
|
||||||
|
} else {
|
||||||
|
drawRect.top = 0;
|
||||||
|
drawRect.left = 0;
|
||||||
|
drawRect.right = displayWidth;
|
||||||
|
drawRect.bottom = displayHeight;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
drawRect.left = ((int)(displayWidth) - (int)sourceWidth) / 2;
|
||||||
|
drawRect.top = ((int)(displayHeight) - (int)sourceHeight) / 2;
|
||||||
|
if(drawRect.left < 0) drawRect.left = 0;
|
||||||
|
if(drawRect.top < 0) drawRect.top = 0;
|
||||||
|
drawRect.right = drawRect.left + sourceWidth;
|
||||||
|
drawRect.bottom = drawRect.top + sourceHeight;
|
||||||
|
}
|
||||||
|
return drawRect;
|
||||||
|
}
|
||||||
|
|
||||||
// we no longer support 8bit modes - no palette necessary
|
// we no longer support 8bit modes - no palette necessary
|
||||||
void S9xSetPalette( void)
|
void S9xSetPalette( void)
|
||||||
{
|
{
|
||||||
@ -476,6 +532,24 @@ void RestoreSNESDisplay ()
|
|||||||
|
|
||||||
/* DirectDraw only end */
|
/* DirectDraw only end */
|
||||||
|
|
||||||
|
void SaveMainWinPos()
|
||||||
|
{
|
||||||
|
WINDOWPLACEMENT wndPlacement={0};
|
||||||
|
wndPlacement.length = sizeof(WINDOWPLACEMENT);
|
||||||
|
GetWindowPlacement(GUI.hWnd,&wndPlacement);
|
||||||
|
GUI.window_maximized = wndPlacement.showCmd == SW_SHOWMAXIMIZED;
|
||||||
|
GUI.window_size = wndPlacement.rcNormalPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RestoreMainWinPos()
|
||||||
|
{
|
||||||
|
WINDOWPLACEMENT wndPlacement={0};
|
||||||
|
wndPlacement.length = sizeof(WINDOWPLACEMENT);
|
||||||
|
wndPlacement.showCmd = GUI.window_maximized?SW_SHOWMAXIMIZED:SW_SHOWNORMAL;
|
||||||
|
wndPlacement.rcNormalPosition = GUI.window_size;
|
||||||
|
SetWindowPlacement(GUI.hWnd,&wndPlacement);
|
||||||
|
}
|
||||||
|
|
||||||
/* ToggleFullScreen
|
/* ToggleFullScreen
|
||||||
switches between fullscreen and window mode and saves the window position
|
switches between fullscreen and window mode and saves the window position
|
||||||
if EmulateFullscreen is set we simply create a borderless window that spans the screen
|
if EmulateFullscreen is set we simply create a borderless window that spans the screen
|
||||||
@ -489,7 +563,7 @@ void ToggleFullScreen ()
|
|||||||
MONITORINFO mi;
|
MONITORINFO mi;
|
||||||
GUI.EmulatedFullscreen = !GUI.EmulatedFullscreen;
|
GUI.EmulatedFullscreen = !GUI.EmulatedFullscreen;
|
||||||
if(GUI.EmulatedFullscreen) {
|
if(GUI.EmulatedFullscreen) {
|
||||||
GetWindowRect (GUI.hWnd, &GUI.window_size);
|
SaveMainWinPos();
|
||||||
if(GetMenu(GUI.hWnd)!=NULL)
|
if(GetMenu(GUI.hWnd)!=NULL)
|
||||||
SetMenu(GUI.hWnd,NULL);
|
SetMenu(GUI.hWnd,NULL);
|
||||||
SetWindowLong (GUI.hWnd, GWL_STYLE, WS_POPUP|WS_VISIBLE);
|
SetWindowLong (GUI.hWnd, GWL_STYLE, WS_POPUP|WS_VISIBLE);
|
||||||
@ -498,40 +572,36 @@ void ToggleFullScreen ()
|
|||||||
GetMonitorInfo(hm,&mi);
|
GetMonitorInfo(hm,&mi);
|
||||||
SetWindowPos (GUI.hWnd, HWND_TOP, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right - mi.rcMonitor.left, mi.rcMonitor.bottom - mi.rcMonitor.top, SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
SetWindowPos (GUI.hWnd, HWND_TOP, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right - mi.rcMonitor.left, mi.rcMonitor.bottom - mi.rcMonitor.top, SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
||||||
} else {
|
} else {
|
||||||
bool maximized = GUI.window_maximized;
|
|
||||||
SetWindowLong( GUI.hWnd, GWL_STYLE, WS_POPUPWINDOW|WS_CAPTION|
|
SetWindowLong( GUI.hWnd, GWL_STYLE, WS_POPUPWINDOW|WS_CAPTION|
|
||||||
WS_THICKFRAME|WS_VISIBLE|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
|
WS_THICKFRAME|WS_VISIBLE|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
|
||||||
SetMenu(GUI.hWnd,GUI.hMenu);
|
SetMenu(GUI.hWnd,GUI.hMenu);
|
||||||
SetWindowPos (GUI.hWnd, HWND_NOTOPMOST, GUI.window_size.left, GUI.window_size.top, GUI.window_size.right - GUI.window_size.left, GUI.window_size.bottom - GUI.window_size.top, SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
SetWindowPos (GUI.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
||||||
if(maximized)
|
RestoreMainWinPos();
|
||||||
ShowWindow(GUI.hWnd, SW_MAXIMIZE);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
GUI.FullScreen = !GUI.FullScreen;
|
GUI.FullScreen = !GUI.FullScreen;
|
||||||
if(GUI.FullScreen) {
|
if(GUI.FullScreen) {
|
||||||
GetWindowRect (GUI.hWnd, &GUI.window_size);
|
SaveMainWinPos();
|
||||||
if(GetMenu(GUI.hWnd)!=NULL)
|
if(GetMenu(GUI.hWnd)!=NULL)
|
||||||
SetMenu(GUI.hWnd,NULL);
|
SetMenu(GUI.hWnd,NULL);
|
||||||
SetWindowLong (GUI.hWnd, GWL_STYLE, WS_POPUP|WS_VISIBLE);
|
SetWindowLong (GUI.hWnd, GWL_STYLE, WS_POPUP|WS_VISIBLE);
|
||||||
SetWindowPos (GUI.hWnd, HWND_TOP, 0, 0, 0, 0, SWP_DRAWFRAME|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOSIZE);
|
SetWindowPos (GUI.hWnd, HWND_TOP, 0, 0, GUI.FullscreenMode.width, GUI.FullscreenMode.height, SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
||||||
if(!S9xDisplayOutput->SetFullscreen(true))
|
if(!S9xDisplayOutput->SetFullscreen(true))
|
||||||
GUI.FullScreen = false;
|
GUI.FullScreen = false;
|
||||||
}
|
}
|
||||||
if(!GUI.FullScreen) {
|
if(!GUI.FullScreen) {
|
||||||
bool maximized = GUI.window_maximized;
|
|
||||||
SetWindowLong( GUI.hWnd, GWL_STYLE, WS_POPUPWINDOW|WS_CAPTION|
|
SetWindowLong( GUI.hWnd, GWL_STYLE, WS_POPUPWINDOW|WS_CAPTION|
|
||||||
WS_THICKFRAME|WS_VISIBLE|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
|
WS_THICKFRAME|WS_VISIBLE|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
|
||||||
SetMenu(GUI.hWnd,GUI.hMenu);
|
SetMenu(GUI.hWnd,GUI.hMenu);
|
||||||
S9xDisplayOutput->SetFullscreen(false);
|
S9xDisplayOutput->SetFullscreen(false);
|
||||||
SetWindowPos (GUI.hWnd, HWND_NOTOPMOST, GUI.window_size.left, GUI.window_size.top, GUI.window_size.right - GUI.window_size.left, GUI.window_size.bottom - GUI.window_size.top, SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
SetWindowPos (GUI.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_DRAWFRAME|SWP_FRAMECHANGED);
|
||||||
if(maximized)
|
RestoreMainWinPos();
|
||||||
ShowWindow(GUI.hWnd, SW_MAXIMIZE);
|
|
||||||
}
|
}
|
||||||
|
S9xGraphicsDeinit();
|
||||||
|
S9xSetWinPixelFormat ();
|
||||||
|
S9xInitUpdate();
|
||||||
|
S9xGraphicsInit();
|
||||||
}
|
}
|
||||||
S9xGraphicsDeinit();
|
|
||||||
S9xSetWinPixelFormat ();
|
|
||||||
S9xInitUpdate();
|
|
||||||
S9xGraphicsInit();
|
|
||||||
IPPU.RenderThisFrame = true;
|
IPPU.RenderThisFrame = true;
|
||||||
|
|
||||||
S9xClearPause (PAUSE_TOGGLE_FULL_SCREEN);
|
S9xClearPause (PAUSE_TOGGLE_FULL_SCREEN);
|
||||||
@ -837,7 +907,7 @@ void WinDisplayStringInBuffer (const char *string, int linesFromBottom, int pixe
|
|||||||
if (linesFromBottom <= 0)
|
if (linesFromBottom <= 0)
|
||||||
linesFromBottom = 1;
|
linesFromBottom = 1;
|
||||||
|
|
||||||
screenPtrType *dst = (screenPtrType *)displayScreen + (displayHeight - fontheight_scaled * linesFromBottom) * displayPpl + pixelsFromLeft;
|
screenPtrType *dst = (screenPtrType *)displayScreen + (displayHeight - fontheight_scaled * linesFromBottom) * displayPpl + (int)(pixelsFromLeft * (2*(float)displayWidth/IPPU.RenderedScreenWidth - displayScale));
|
||||||
|
|
||||||
int len = strlen(string);
|
int len = strlen(string);
|
||||||
int max_chars = displayWidth / (fontwidth_scaled - displayScale);
|
int max_chars = displayWidth / (fontwidth_scaled - displayScale);
|
||||||
@ -863,4 +933,4 @@ void WinDisplayStringInBuffer (const char *string, int linesFromBottom, int pixe
|
|||||||
WinDisplayChar(dst, string[i]);
|
WinDisplayChar(dst, string[i]);
|
||||||
dst += fontwidth_scaled - displayScale;
|
dst += fontwidth_scaled - displayScale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,12 +189,16 @@
|
|||||||
void WinRefreshDisplay(void);
|
void WinRefreshDisplay(void);
|
||||||
void S9xSetWinPixelFormat ();
|
void S9xSetWinPixelFormat ();
|
||||||
void SwitchToGDI();
|
void SwitchToGDI();
|
||||||
|
void SaveMainWinPos();
|
||||||
|
void RestoreMainWinPos();
|
||||||
void ToggleFullScreen ();
|
void ToggleFullScreen ();
|
||||||
void RestoreGUIDisplay ();
|
void RestoreGUIDisplay ();
|
||||||
void RestoreSNESDisplay ();
|
void RestoreSNESDisplay ();
|
||||||
void WinChangeWindowSize(unsigned int newWidth, unsigned int newHeight);
|
void WinChangeWindowSize(unsigned int newWidth, unsigned int newHeight);
|
||||||
bool WinDisplayReset(void);
|
bool WinDisplayReset(void);
|
||||||
void WinDisplayApplyChanges();
|
void WinDisplayApplyChanges();
|
||||||
|
RECT CalculateDisplayRect(unsigned int sourceWidth,unsigned int sourceHeight,
|
||||||
|
unsigned int displayWidth,unsigned int displayHeight);
|
||||||
void WinEnumDisplayModes(std::vector<dMode> *modeVector);
|
void WinEnumDisplayModes(std::vector<dMode> *modeVector);
|
||||||
void ConvertDepth (SSurface *src, SSurface *dst, RECT *srect);
|
void ConvertDepth (SSurface *src, SSurface *dst, RECT *srect);
|
||||||
void WinDisplayStringFromBottom (const char *string, int linesFromBottom, int pixelsFromLeft, bool allowWrap);
|
void WinDisplayStringFromBottom (const char *string, int linesFromBottom, int pixelsFromLeft, bool allowWrap);
|
||||||
@ -202,4 +206,4 @@ void WinSetCustomDisplaySurface(void *screen, int ppl, int width, int height, in
|
|||||||
template<typename screenPtrType>
|
template<typename screenPtrType>
|
||||||
void WinDisplayStringInBuffer (const char *string, int linesFromBottom, int pixelsFromLeft, bool allowWrap);
|
void WinDisplayStringInBuffer (const char *string, int linesFromBottom, int pixelsFromLeft, bool allowWrap);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -187,8 +187,12 @@
|
|||||||
#pragma comment(linker,"/DEFAULTLIB:fmodvc.lib")
|
#pragma comment(linker,"/DEFAULTLIB:fmodvc.lib")
|
||||||
#elif defined FMODEX_SUPPORT
|
#elif defined FMODEX_SUPPORT
|
||||||
#include "CFMODEx.h"
|
#include "CFMODEx.h"
|
||||||
|
#if defined(_WIN64)
|
||||||
|
#pragma comment(linker,"/DEFAULTLIB:fmodex64_vc.lib")
|
||||||
|
#else
|
||||||
#pragma comment(linker,"/DEFAULTLIB:fmodex_vc.lib")
|
#pragma comment(linker,"/DEFAULTLIB:fmodex_vc.lib")
|
||||||
#endif
|
#endif // _WIN64
|
||||||
|
#endif // FMODEX_SUPPORT
|
||||||
|
|
||||||
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
|
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
|
||||||
|
|
||||||
@ -253,7 +257,7 @@ bool8 S9xOpenSoundDevice ()
|
|||||||
S9xSoundOutput = &S9xFMODEx;
|
S9xSoundOutput = &S9xFMODEx;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case WIN_XAUDIO2_SOUND_DRIVER:
|
case WIN_XAUDIO2_SOUND_DRIVER:
|
||||||
S9xSoundOutput = &S9xXAudio2;
|
S9xSoundOutput = &S9xXAudio2;
|
||||||
break;
|
break;
|
||||||
default: // we default to DirectSound
|
default: // we default to DirectSound
|
||||||
@ -272,4 +276,4 @@ called by the sound core to process generated samples
|
|||||||
void S9xSoundCallback(void *data)
|
void S9xSoundCallback(void *data)
|
||||||
{
|
{
|
||||||
S9xSoundOutput->ProcessSound();
|
S9xSoundOutput->ProcessSound();
|
||||||
}
|
}
|
||||||
|
@ -179,116 +179,116 @@
|
|||||||
|
|
||||||
/* This is where all the GUI text strings will eventually end up */
|
/* This is where all the GUI text strings will eventually end up */
|
||||||
|
|
||||||
#define WINDOW_TITLE "Snes9X v%s for Windows"
|
#define WINDOW_TITLE TEXT("Snes9X v1.5X Testing")
|
||||||
|
|
||||||
// the windows registry is no longer used
|
// the windows registry is no longer used
|
||||||
//#define MY_REG_KEY "Software\\Emulators\\Snes9X"
|
//#define MY_REG_KEY "Software\\Emulators\\Snes9X"
|
||||||
//#define REG_KEY_VER "1.31"
|
//#define REG_KEY_VER "1.31"
|
||||||
|
|
||||||
#define DISCLAIMER_TEXT "Snes9X v%s for Windows.\r\n" \
|
#define DISCLAIMER_TEXT TEXT("Snes9X v%s for Windows.\r\n\
|
||||||
"(c) Copyright 1996 - 2002 Gary Henderson and Jerremy Koot (jkoot@snes9x.com)\r\n" \
|
(c) Copyright 1996 - 2002 Gary Henderson and Jerremy Koot (jkoot@snes9x.com)\r\n\
|
||||||
"(c) Copyright 2002 - 2004 Matthew Kendora\r\n" \
|
(c) Copyright 2002 - 2004 Matthew Kendora\r\n\
|
||||||
"(c) Copyright 2002 - 2005 Peter Bortas\r\n" \
|
(c) Copyright 2002 - 2005 Peter Bortas\r\n\
|
||||||
"(c) Copyright 2004 - 2005 Joel Yliluoma\r\n" \
|
(c) Copyright 2004 - 2005 Joel Yliluoma\r\n\
|
||||||
"(c) Copyright 2001 - 2006 John Weidman\r\n" \
|
(c) Copyright 2001 - 2006 John Weidman\r\n\
|
||||||
"(c) Copyright 2002 - 2010 Brad Jorsch, funkyass, Kris Bleakley, Nach, zones\r\n" \
|
(c) Copyright 2002 - 2010 Brad Jorsch, funkyass, Kris Bleakley, Nach, zones\r\n\
|
||||||
"(c) Copyright 2006 - 2007 nitsuja\r\n" \
|
(c) Copyright 2006 - 2007 nitsuja\r\n\
|
||||||
"(c) Copyright 2009 - 2010 BearOso, OV2\r\n\r\n" \
|
(c) Copyright 2009 - 2010 BearOso, OV2\r\n\r\n\
|
||||||
"Windows Port Authors: Matthew Kendora, funkyass, nitsuja, Nach, blip, OV2.\r\n\r\n" \
|
Windows Port Authors: Matthew Kendora, funkyass, nitsuja, Nach, blip, OV2.\r\n\r\n\
|
||||||
"Snes9X is a Super Nintendo Entertainment System\r\n" \
|
Snes9X is a Super Nintendo Entertainment System\r\n\
|
||||||
"emulator that allows you to play most games designed\r\n" \
|
emulator that allows you to play most games designed\r\n\
|
||||||
"for the SNES on your PC.\r\n\r\n" \
|
for the SNES on your PC.\r\n\r\n\
|
||||||
"Please visit http://www.snes9x.com for\r\n" \
|
Please visit http://www.snes9x.com for\r\n\
|
||||||
"up-to-the-minute information and help on Snes9X.\r\n\r\n" \
|
up-to-the-minute information and help on Snes9X.\r\n\r\n\
|
||||||
"Nintendo is a trade mark."
|
Nintendo is a trade mark.")
|
||||||
|
|
||||||
|
|
||||||
#define APP_NAME "Snes9x"
|
#define APP_NAME TEXT("Snes9x")
|
||||||
// possible global strings
|
// possible global strings
|
||||||
#define SNES9X_INFO "Snes9x: Information"
|
#define SNES9X_INFO TEXT("Snes9x: Information")
|
||||||
#define SNES9X_WARN "Snes9x: WARNING!"
|
#define SNES9X_WARN TEXT("Snes9x: WARNING!")
|
||||||
#define SNES9X_DXS "Snes9X: DirectSound"
|
#define SNES9X_DXS TEXT("Snes9X: DirectSound")
|
||||||
#define SNES9X_SNDQ "Snes9X: Sound CPU Question"
|
#define SNES9X_SNDQ TEXT("Snes9X: Sound CPU Question")
|
||||||
#define SNES9X_NP_ERROR "Snes9X: NetPlay Error"
|
#define SNES9X_NP_ERROR TEXT("Snes9X: NetPlay Error")
|
||||||
#define BUTTON_OK "&OK"
|
#define BUTTON_OK TEXT("&OK")
|
||||||
#define BUTTON_CANCEL "&Cancel"
|
#define BUTTON_CANCEL TEXT("&Cancel")
|
||||||
|
|
||||||
// Gamepad Dialog Strings
|
// Gamepad Dialog Strings
|
||||||
#define INPUTCONFIG_TITLE "Input Configuration"
|
#define INPUTCONFIG_TITLE TEXT("Input Configuration")
|
||||||
#define INPUTCONFIG_JPTOGGLE "Enabled"
|
#define INPUTCONFIG_JPTOGGLE TEXT("Enabled")
|
||||||
//#define INPUTCONFIG_DIAGTOGGLE "Toggle Diagonals"
|
//#define INPUTCONFIG_DIAGTOGGLE "Toggle Diagonals"
|
||||||
//#define INPUTCONFIG_OK "&OK"
|
//#define INPUTCONFIG_OK "&OK"
|
||||||
//#define INPUTCONFIG_CANCEL "&Cancel"
|
//#define INPUTCONFIG_CANCEL "&Cancel"
|
||||||
#define INPUTCONFIG_JPCOMBO "Joypad #%d"
|
#define INPUTCONFIG_JPCOMBO TEXT("Joypad #%d")
|
||||||
#define INPUTCONFIG_LABEL_UP "Up"
|
#define INPUTCONFIG_LABEL_UP TEXT("Up")
|
||||||
#define INPUTCONFIG_LABEL_DOWN "Down"
|
#define INPUTCONFIG_LABEL_DOWN TEXT("Down")
|
||||||
#define INPUTCONFIG_LABEL_LEFT "Left"
|
#define INPUTCONFIG_LABEL_LEFT TEXT("Left")
|
||||||
#define INPUTCONFIG_LABEL_RIGHT "Right"
|
#define INPUTCONFIG_LABEL_RIGHT TEXT("Right")
|
||||||
#define INPUTCONFIG_LABEL_A "A"
|
#define INPUTCONFIG_LABEL_A TEXT("A")
|
||||||
#define INPUTCONFIG_LABEL_B "B"
|
#define INPUTCONFIG_LABEL_B TEXT("B")
|
||||||
#define INPUTCONFIG_LABEL_X "X"
|
#define INPUTCONFIG_LABEL_X TEXT("X")
|
||||||
#define INPUTCONFIG_LABEL_Y "Y"
|
#define INPUTCONFIG_LABEL_Y TEXT("Y")
|
||||||
#define INPUTCONFIG_LABEL_L "L"
|
#define INPUTCONFIG_LABEL_L TEXT("L")
|
||||||
#define INPUTCONFIG_LABEL_R "R"
|
#define INPUTCONFIG_LABEL_R TEXT("R")
|
||||||
#define INPUTCONFIG_LABEL_START "Start"
|
#define INPUTCONFIG_LABEL_START TEXT("Start")
|
||||||
#define INPUTCONFIG_LABEL_SELECT "Select"
|
#define INPUTCONFIG_LABEL_SELECT TEXT("Select")
|
||||||
#define INPUTCONFIG_LABEL_UPLEFT "Up Left"
|
#define INPUTCONFIG_LABEL_UPLEFT TEXT("Up Left")
|
||||||
#define INPUTCONFIG_LABEL_UPRIGHT "Up Right"
|
#define INPUTCONFIG_LABEL_UPRIGHT TEXT("Up Right")
|
||||||
#define INPUTCONFIG_LABEL_DOWNRIGHT "Dn Right"
|
#define INPUTCONFIG_LABEL_DOWNRIGHT TEXT("Dn Right")
|
||||||
#define INPUTCONFIG_LABEL_DOWNLEFT "Dn Left"
|
#define INPUTCONFIG_LABEL_DOWNLEFT TEXT("Dn Left")
|
||||||
#define INPUTCONFIG_LABEL_BLUE "Blue means the button is already mapped.\nPink means it conflicts with a custom hotkey.\nRed means it's reserved by Windows.\nButtons can be disabled using Escape."
|
#define INPUTCONFIG_LABEL_BLUE TEXT("Blue means the button is already mapped.\nPink means it conflicts with a custom hotkey.\nRed means it's reserved by Windows.\nButtons can be disabled using Escape.")
|
||||||
#define INPUTCONFIG_LABEL_UNUSED ""
|
#define INPUTCONFIG_LABEL_UNUSED TEXT("")
|
||||||
#define INPUTCONFIG_LABEL_CLEAR_TOGGLES_AND_TURBO "Clear All"
|
#define INPUTCONFIG_LABEL_CLEAR_TOGGLES_AND_TURBO TEXT("Clear All")
|
||||||
#define INPUTCONFIG_LABEL_MAKE_TURBO "TempTurbo"
|
#define INPUTCONFIG_LABEL_MAKE_TURBO TEXT("TempTurbo")
|
||||||
#define INPUTCONFIG_LABEL_MAKE_HELD "Autohold"
|
#define INPUTCONFIG_LABEL_MAKE_HELD TEXT("Autohold")
|
||||||
#define INPUTCONFIG_LABEL_MAKE_TURBO_HELD "Autofire"
|
#define INPUTCONFIG_LABEL_MAKE_TURBO_HELD TEXT("Autofire")
|
||||||
#define INPUTCONFIG_LABEL_CONTROLLER_TURBO_PANEL_MOD " Turbo"
|
#define INPUTCONFIG_LABEL_CONTROLLER_TURBO_PANEL_MOD TEXT(" Turbo")
|
||||||
|
|
||||||
// Hotkeys Dialog Strings
|
// Hotkeys Dialog Strings
|
||||||
#define HOTKEYS_TITLE "Hotkey Configuration"
|
#define HOTKEYS_TITLE TEXT("Hotkey Configuration")
|
||||||
#define HOTKEYS_CONTROL_MOD "Ctrl + "
|
#define HOTKEYS_CONTROL_MOD "Ctrl + "
|
||||||
#define HOTKEYS_SHIFT_MOD "Shift + "
|
#define HOTKEYS_SHIFT_MOD "Shift + "
|
||||||
#define HOTKEYS_ALT_MOD "Alt + "
|
#define HOTKEYS_ALT_MOD "Alt + "
|
||||||
#define HOTKEYS_LABEL_BLUE "Blue means the hotkey is already mapped.\nPink means it conflicts with a game button.\nRed means it's reserved by Windows.\nA hotkey can be disabled using Escape."
|
#define HOTKEYS_LABEL_BLUE TEXT("Blue means the hotkey is already mapped.\nPink means it conflicts with a game button.\nRed means it's reserved by Windows.\nA hotkey can be disabled using Escape.")
|
||||||
#define HOTKEYS_HKCOMBO "Page %d"
|
#define HOTKEYS_HKCOMBO TEXT("Page %d")
|
||||||
#define HOTKEYS_LABEL_1_1 "speed +"
|
#define HOTKEYS_LABEL_1_1 TEXT("speed +")
|
||||||
#define HOTKEYS_LABEL_1_2 "speed -"
|
#define HOTKEYS_LABEL_1_2 TEXT("speed -")
|
||||||
#define HOTKEYS_LABEL_1_3 "pause"
|
#define HOTKEYS_LABEL_1_3 TEXT("pause")
|
||||||
#define HOTKEYS_LABEL_1_4 "frame advance"
|
#define HOTKEYS_LABEL_1_4 TEXT("frame advance")
|
||||||
#define HOTKEYS_LABEL_1_5 "fast forward"
|
#define HOTKEYS_LABEL_1_5 TEXT("fast forward")
|
||||||
#define HOTKEYS_LABEL_1_6 "skip +"
|
#define HOTKEYS_LABEL_1_6 TEXT("skip +")
|
||||||
#define HOTKEYS_LABEL_1_7 "skip -"
|
#define HOTKEYS_LABEL_1_7 TEXT("skip -")
|
||||||
#define HOTKEYS_LABEL_1_8 "superscope turbo"
|
#define HOTKEYS_LABEL_1_8 TEXT("superscope turbo")
|
||||||
#define HOTKEYS_LABEL_1_9 "superscope pause"
|
#define HOTKEYS_LABEL_1_9 TEXT("superscope pause")
|
||||||
#define HOTKEYS_LABEL_1_10 "show pressed keys"
|
#define HOTKEYS_LABEL_1_10 TEXT("show pressed keys")
|
||||||
#define HOTKEYS_LABEL_1_11 "movie frame count"
|
#define HOTKEYS_LABEL_1_11 TEXT("movie frame count")
|
||||||
#define HOTKEYS_LABEL_1_12 "movie read-only"
|
#define HOTKEYS_LABEL_1_12 TEXT("movie read-only")
|
||||||
#define HOTKEYS_LABEL_1_13 "save screenshot"
|
#define HOTKEYS_LABEL_1_13 TEXT("save screenshot")
|
||||||
#define HOTKEYS_LABEL_2_1 "Graphics Layer 1"
|
#define HOTKEYS_LABEL_2_1 TEXT("Graphics Layer 1")
|
||||||
#define HOTKEYS_LABEL_2_2 "Graphics Layer 2"
|
#define HOTKEYS_LABEL_2_2 TEXT("Graphics Layer 2")
|
||||||
#define HOTKEYS_LABEL_2_3 "Graphics Layer 3"
|
#define HOTKEYS_LABEL_2_3 TEXT("Graphics Layer 3")
|
||||||
#define HOTKEYS_LABEL_2_4 "Graphics Layer 4"
|
#define HOTKEYS_LABEL_2_4 TEXT("Graphics Layer 4")
|
||||||
#define HOTKEYS_LABEL_2_5 "Sprites Layer"
|
#define HOTKEYS_LABEL_2_5 TEXT("Sprites Layer")
|
||||||
#define HOTKEYS_LABEL_2_6 "Clipping Windows"
|
#define HOTKEYS_LABEL_2_6 TEXT("Clipping Windows")
|
||||||
#define HOTKEYS_LABEL_2_7 "Transparency"
|
#define HOTKEYS_LABEL_2_7 TEXT("Transparency")
|
||||||
#define HOTKEYS_LABEL_2_8 "HDMA Emulation"
|
#define HOTKEYS_LABEL_2_8 TEXT("HDMA Emulation")
|
||||||
#define HOTKEYS_LABEL_2_9 "GLCube Mode"
|
#define HOTKEYS_LABEL_2_9 TEXT("GLCube Mode")
|
||||||
#define HOTKEYS_LABEL_2_10 "Switch Controllers"
|
#define HOTKEYS_LABEL_2_10 TEXT("Switch Controllers")
|
||||||
#define HOTKEYS_LABEL_2_11 "Joypad Swap"
|
#define HOTKEYS_LABEL_2_11 TEXT("Joypad Swap")
|
||||||
#define HOTKEYS_LABEL_2_12 "Reset Game"
|
#define HOTKEYS_LABEL_2_12 TEXT("Reset Game")
|
||||||
#define HOTKEYS_LABEL_2_13 "Toggle Cheats"
|
#define HOTKEYS_LABEL_2_13 TEXT("Toggle Cheats")
|
||||||
#define HOTKEYS_LABEL_3_1 "Turbo A mode"
|
#define HOTKEYS_LABEL_3_1 TEXT("Turbo A mode")
|
||||||
#define HOTKEYS_LABEL_3_2 "Turbo B mode"
|
#define HOTKEYS_LABEL_3_2 TEXT("Turbo B mode")
|
||||||
#define HOTKEYS_LABEL_3_3 "Turbo Y mode"
|
#define HOTKEYS_LABEL_3_3 TEXT("Turbo Y mode")
|
||||||
#define HOTKEYS_LABEL_3_4 "Turbo X mode"
|
#define HOTKEYS_LABEL_3_4 TEXT("Turbo X mode")
|
||||||
#define HOTKEYS_LABEL_3_5 "Turbo L mode"
|
#define HOTKEYS_LABEL_3_5 TEXT("Turbo L mode")
|
||||||
#define HOTKEYS_LABEL_3_6 "Turbo R mode"
|
#define HOTKEYS_LABEL_3_6 TEXT("Turbo R mode")
|
||||||
#define HOTKEYS_LABEL_3_7 "Turbo Start mode"
|
#define HOTKEYS_LABEL_3_7 TEXT("Turbo Start mode")
|
||||||
#define HOTKEYS_LABEL_3_8 "Turbo Select mode"
|
#define HOTKEYS_LABEL_3_8 TEXT("Turbo Select mode")
|
||||||
#define HOTKEYS_LABEL_3_9 "Turbo Left mode"
|
#define HOTKEYS_LABEL_3_9 TEXT("Turbo Left mode")
|
||||||
#define HOTKEYS_LABEL_3_10 "Turbo Up mode"
|
#define HOTKEYS_LABEL_3_10 TEXT("Turbo Up mode")
|
||||||
#define HOTKEYS_LABEL_3_11 "Turbo Right mode"
|
#define HOTKEYS_LABEL_3_11 TEXT("Turbo Right mode")
|
||||||
#define HOTKEYS_LABEL_3_12 "Turbo Down mode"
|
#define HOTKEYS_LABEL_3_12 TEXT("Turbo Down mode")
|
||||||
//#define HOTKEYS_LABEL_4_12 "Interpolate Mode 7"
|
//#define HOTKEYS_LABEL_4_12 "Interpolate Mode 7"
|
||||||
//#define HOTKEYS_LABEL_4_13 "BG Layering hack"
|
//#define HOTKEYS_LABEL_4_13 "BG Layering hack"
|
||||||
|
|
||||||
@ -449,70 +449,70 @@
|
|||||||
|
|
||||||
//Emulator Settings
|
//Emulator Settings
|
||||||
|
|
||||||
#define EMUSET_TITLE "Emulation Settings"
|
#define EMUSET_TITLE TEXT("Emulation Settings")
|
||||||
#define EMUSET_LABEL_DIRECTORY "Directory"
|
#define EMUSET_LABEL_DIRECTORY TEXT("Directory")
|
||||||
#define EMUSET_BROWSE "&Browse..."
|
#define EMUSET_BROWSE TEXT("&Browse...")
|
||||||
#define EMUSET_LABEL_ASRAM "Auto-Save S-RAM"
|
#define EMUSET_LABEL_ASRAM TEXT("Auto-Save S-RAM")
|
||||||
#define EMUSET_LABEL_ASRAM_TEXT "seconds after last change (0 disables auto-save)"
|
#define EMUSET_LABEL_ASRAM_TEXT TEXT("seconds after last change (0 disables auto-save)")
|
||||||
#define EMUSET_LABEL_SMAX "Skip at most"
|
#define EMUSET_LABEL_SMAX TEXT("Skip at most")
|
||||||
#define EMUSET_LABEL_SMAX_TEXT "frames in auto-frame rate mode"
|
#define EMUSET_LABEL_SMAX_TEXT TEXT("frames in auto-frame rate mode")
|
||||||
#define EMUSET_LABEL_STURBO "Skip Rendering"
|
#define EMUSET_LABEL_STURBO TEXT("Skip Rendering")
|
||||||
#define EMUSET_LABEL_STURBO_TEXT "frames in fast-forward mode"
|
#define EMUSET_LABEL_STURBO_TEXT TEXT("frames in fast-forward mode")
|
||||||
#define EMUSET_TOGGLE_TURBO "Toggled fast-forward mode"
|
#define EMUSET_TOGGLE_TURBO TEXT("Toggled fast-forward mode")
|
||||||
|
|
||||||
//Netplay Options
|
//Netplay Options
|
||||||
|
|
||||||
#define NPOPT_TITLE "Netplay Options"
|
#define NPOPT_TITLE TEXT("Netplay Options")
|
||||||
#define NPOPT_LABEL_PORTNUM "Socket Port Number"
|
#define NPOPT_LABEL_PORTNUM TEXT("Socket Port Number")
|
||||||
#define NPOPT_LABEL_PAUSEINTERVAL "Ask Server to Pause when"
|
#define NPOPT_LABEL_PAUSEINTERVAL TEXT("Ask Server to Pause when")
|
||||||
#define NPOPT_LABEL_PAUSEINTERVAL_TEXT "frames behind"
|
#define NPOPT_LABEL_PAUSEINTERVAL_TEXT TEXT("frames behind")
|
||||||
#define NPOPT_LABEL_MAXSKIP "Maximum Frame Rate Skip"
|
#define NPOPT_LABEL_MAXSKIP TEXT("Maximum Frame Rate Skip")
|
||||||
#define NPOPT_SYNCBYRESET "Sync By Reset"
|
#define NPOPT_SYNCBYRESET TEXT("Sync By Reset")
|
||||||
#define NPOPT_SENDROM "Send ROM Image to Client on Connect"
|
#define NPOPT_SENDROM TEXT("Send ROM Image to Client on Connect")
|
||||||
#define NPOPT_ACTASSERVER "Act As Server"
|
#define NPOPT_ACTASSERVER TEXT("Act As Server")
|
||||||
#define NPOPT_PORTNUMBLOCK "Port Settings"
|
#define NPOPT_PORTNUMBLOCK TEXT("Port Settings")
|
||||||
#define NPOPT_CLIENTSETTINGSBLOCK "Client Settings"
|
#define NPOPT_CLIENTSETTINGSBLOCK TEXT("Client Settings")
|
||||||
#define NPOPT_SERVERSETTINGSBLOCK "Server Settings"
|
#define NPOPT_SERVERSETTINGSBLOCK TEXT("Server Settings")
|
||||||
|
|
||||||
//Netplay Connect
|
//Netplay Connect
|
||||||
|
|
||||||
|
|
||||||
#define NPCON_TITLE "Connect to Server"
|
#define NPCON_TITLE TEXT("Connect to Server")
|
||||||
#define NPCON_LABEL_SERVERADDY "Server Address"
|
#define NPCON_LABEL_SERVERADDY TEXT("Server Address")
|
||||||
#define NPCON_LABEL_PORTNUM "Port Number"
|
#define NPCON_LABEL_PORTNUM TEXT("Port Number")
|
||||||
#define NPCON_CLEARHISTORY "Clear History"
|
#define NPCON_CLEARHISTORY TEXT("Clear History")
|
||||||
#define NPCON_ENTERHOST "enter host name..."
|
#define NPCON_ENTERHOST TEXT("enter host name...")
|
||||||
#define NPCON_PLEASE_ENTERHOST "Please enter a host name."
|
#define NPCON_PLEASE_ENTERHOST TEXT("Please enter a host name.")
|
||||||
|
|
||||||
|
|
||||||
//Movie Messages
|
//Movie Messages
|
||||||
|
|
||||||
#define MOVIE_FILETYPE_DESCRIPTION "Snes9x Movie File"
|
#define MOVIE_FILETYPE_DESCRIPTION TEXT("Snes9x Movie File")
|
||||||
#define MOVIE_LABEL_SYNC_DATA_FROM_MOVIE "LOADED FROM MOVIE:"
|
#define MOVIE_LABEL_SYNC_DATA_FROM_MOVIE TEXT("LOADED FROM MOVIE:")
|
||||||
#define MOVIE_LABEL_SYNC_DATA_NOT_FROM_MOVIE "SETTINGS NOT IN MOVIE; VERIFY:"
|
#define MOVIE_LABEL_SYNC_DATA_NOT_FROM_MOVIE TEXT("SETTINGS NOT IN MOVIE; VERIFY:")
|
||||||
#define MOVIE_ERR_COULD_NOT_OPEN "Could not open movie file."
|
#define MOVIE_ERR_COULD_NOT_OPEN TEXT("Could not open movie file.")
|
||||||
#define MOVIE_ERR_NOT_FOUND_SHORT "File not found."
|
#define MOVIE_ERR_NOT_FOUND_SHORT TEXT("File not found.")
|
||||||
#define MOVIE_ERR_NOT_FOUND "The movie file was not found or could not be opened."
|
#define MOVIE_ERR_NOT_FOUND TEXT("The movie file was not found or could not be opened.")
|
||||||
#define MOVIE_ERR_WRONG_FORMAT_SHORT "Unrecognized format."
|
#define MOVIE_ERR_WRONG_FORMAT_SHORT TEXT("Unrecognized format.")
|
||||||
#define MOVIE_ERR_WRONG_FORMAT "The movie file is corrupt or in the wrong format."
|
#define MOVIE_ERR_WRONG_FORMAT TEXT("The movie file is corrupt or in the wrong format.")
|
||||||
#define MOVIE_ERR_WRONG_VERSION_SHORT "Unsupported movie version."
|
#define MOVIE_ERR_WRONG_VERSION_SHORT TEXT("Unsupported movie version.")
|
||||||
#define MOVIE_ERR_WRONG_VERSION MOVIE_ERR_WRONG_VERSION_SHORT " You need a different version of Snes9x to play this movie."
|
#define MOVIE_ERR_WRONG_VERSION MOVIE_ERR_WRONG_VERSION_SHORT TEXT(" You need a different version of Snes9x to play this movie.")
|
||||||
#define MOVIE_ERR_NOFRAMETOGGLE "No movie; can't toggle frame count"
|
#define MOVIE_ERR_NOFRAMETOGGLE "No movie; can't toggle frame count"
|
||||||
#define MOVIE_ERR_NOREADONLYTOGGLE "No movie; can't toggle read-only"
|
#define MOVIE_ERR_NOREADONLYTOGGLE "No movie; can't toggle read-only"
|
||||||
#define MOVIE_LABEL_AUTHORINFO "Author Info:"
|
#define MOVIE_LABEL_AUTHORINFO TEXT("Author Info:")
|
||||||
#define MOVIE_LABEL_ERRORINFO "Error Info:"
|
#define MOVIE_LABEL_ERRORINFO TEXT("Error Info:")
|
||||||
#define MOVIE_INFO_MISMATCH " <-- MISMATCH !!!"
|
#define MOVIE_INFO_MISMATCH TEXT(" <-- MISMATCH !!!")
|
||||||
#define MOVIE_INFO_CURRENTROM "Current ROM:"
|
#define MOVIE_INFO_CURRENTROM TEXT("Current ROM:")
|
||||||
#define MOVIE_INFO_MOVIEROM "Movie's ROM:"
|
#define MOVIE_INFO_MOVIEROM TEXT("Movie's ROM:")
|
||||||
#define MOVIE_INFO_ROMNOTSTORED " (not stored in movie file)"
|
#define MOVIE_INFO_ROMNOTSTORED TEXT(" (not stored in movie file)")
|
||||||
#define MOVIE_INFO_ROMINFO " crc32=%08X, name=%s"
|
#define MOVIE_INFO_ROMINFO TEXT(" crc32=%08X, name=%s")
|
||||||
#define MOVIE_INFO_DIRECTORY " Path: %s"
|
#define MOVIE_INFO_DIRECTORY TEXT(" Path: %s")
|
||||||
#define MOVIE_WARNING_MISMATCH "WARNING: You don't have the right ROM loaded!"
|
#define MOVIE_WARNING_MISMATCH TEXT("WARNING: You don't have the right ROM loaded!")
|
||||||
#define MOVIE_WARNING_OK "Press OK to start playing the movie."
|
#define MOVIE_WARNING_OK TEXT("Press OK to start playing the movie.")
|
||||||
#define MOVIE_LABEL_STARTSETTINGS "Recording Start"
|
#define MOVIE_LABEL_STARTSETTINGS TEXT("Recording Start")
|
||||||
#define MOVIE_LABEL_CONTSETTINGS "Record Controllers"
|
#define MOVIE_LABEL_CONTSETTINGS TEXT("Record Controllers")
|
||||||
#define MOVIE_LABEL_SYNCSETTINGS "Misc. Recording Settings"
|
#define MOVIE_LABEL_SYNCSETTINGS TEXT("Misc. Recording Settings")
|
||||||
#define MOVIE_SHUTDOWNMASTER_WARNING "The \"SpeedHacks\" setting in your snes9x.cfg file is on.\nThis makes emulation less CPU-intensive, but also less accurate,\ncausing some games to lag noticeably more than they should.\nYou might want to reconsider recording a movie under these conditions."
|
#define MOVIE_SHUTDOWNMASTER_WARNING TEXT("The \"SpeedHacks\" setting in your snes9x.cfg file is on.\nThis makes emulation less CPU-intensive, but also less accurate,\ncausing some games to lag noticeably more than they should.\nYou might want to reconsider recording a movie under these conditions.")
|
||||||
|
|
||||||
// Save Messages
|
// Save Messages
|
||||||
|
|
||||||
@ -525,69 +525,71 @@
|
|||||||
|
|
||||||
// Cheat or Cheat Search Messages
|
// Cheat or Cheat Search Messages
|
||||||
|
|
||||||
#define SEARCH_TITLE_RANGEERROR "Range Error"
|
#define SEARCH_TITLE_RANGEERROR TEXT("Range Error")
|
||||||
#define SEARCH_TITLE_CHEATERROR "Snes9x Cheat Error"
|
#define SEARCH_TITLE_CHEATERROR TEXT("Snes9x Cheat Error")
|
||||||
#define SEARCH_ERR_INVALIDNEWVALUE "You have entered an out of range or invalid value for the new value"
|
#define SEARCH_ERR_INVALIDNEWVALUE TEXT("You have entered an out of range or invalid value for the new value")
|
||||||
#define SEARCH_ERR_INVALIDCURVALUE "You have entered an out of range or invalid value for\n"\
|
#define SEARCH_ERR_INVALIDCURVALUE TEXT("You have entered an out of range or invalid value for\n\
|
||||||
"the current value. This value is used when a cheat is unapplied.\n"\
|
the current value. This value is used when a cheat is unapplied.\n\
|
||||||
"(If left blank, no value is restored when the cheat is unapplied)"
|
(If left blank, no value is restored when the cheat is unapplied)")
|
||||||
#define SEARCH_ERR_INVALIDSEARCHVALUE "Please enter a valid value for a search!"
|
#define SEARCH_ERR_INVALIDSEARCHVALUE TEXT("Please enter a valid value for a search!")
|
||||||
#define SEARCH_COLUMN_ADDRESS "Address"
|
#define SEARCH_COLUMN_ADDRESS TEXT("Address")
|
||||||
#define SEARCH_COLUMN_VALUE "Value"
|
#define SEARCH_COLUMN_VALUE TEXT("Value")
|
||||||
#define SEARCH_COLUMN_DESCRIPTION "Description"
|
#define SEARCH_COLUMN_DESCRIPTION TEXT("Description")
|
||||||
|
|
||||||
// ROM dialog
|
// ROM dialog
|
||||||
|
|
||||||
#define ROM_COLUMN_FILENAME "File"
|
#define ROM_COLUMN_FILENAME TEXT("File")
|
||||||
#define ROM_COLUMN_DESCRIPTION "Description"
|
#define ROM_COLUMN_DESCRIPTION TEXT("Description")
|
||||||
#define ROM_COLUMN_SIZE "Size"
|
#define ROM_COLUMN_SIZE TEXT("Size")
|
||||||
#define ROM_OPTION_AUTODETECT "Auto-Detect"
|
#define ROM_OPTION_AUTODETECT TEXT("Auto-Detect")
|
||||||
#define ROM_OPTION_FORCEHEADER "Force Header"
|
#define ROM_OPTION_FORCEHEADER TEXT("Force Header")
|
||||||
#define ROM_OPTION_FORCENOHEADER "Force No Header"
|
#define ROM_OPTION_FORCENOHEADER TEXT("Force No Header")
|
||||||
#define ROM_OPTION_FORCEPAL "Force PAL"
|
#define ROM_OPTION_FORCEPAL TEXT("Force PAL")
|
||||||
#define ROM_OPTION_FORCENTSC "Force NTSC"
|
#define ROM_OPTION_FORCENTSC TEXT("Force NTSC")
|
||||||
#define ROM_OPTION_FORCEHIROM "Force HiROM"
|
#define ROM_OPTION_FORCEHIROM TEXT("Force HiROM")
|
||||||
#define ROM_OPTION_FORCELOROM "Force LoROM"
|
#define ROM_OPTION_FORCELOROM TEXT("Force LoROM")
|
||||||
#define ROM_OPTION_NONINTERLEAVED "Force not interleaved"
|
#define ROM_OPTION_NONINTERLEAVED TEXT("Force not interleaved")
|
||||||
#define ROM_OPTION_MODE1 "Force mode 1"
|
#define ROM_OPTION_MODE1 TEXT("Force mode 1")
|
||||||
#define ROM_OPTION_MODE2 "Force mode 2"
|
#define ROM_OPTION_MODE2 TEXT("Force mode 2")
|
||||||
#define ROM_OPTION_GD24 "Force GD24"
|
#define ROM_OPTION_GD24 TEXT("Force GD24")
|
||||||
#define ROM_ITEM_NOTAROM "Not a ROM"
|
#define ROM_ITEM_NOTAROM TEXT("Not a ROM")
|
||||||
#define ROM_ITEM_CANTOPEN "Can't Open File"
|
#define ROM_ITEM_CANTOPEN TEXT("Can't Open File")
|
||||||
#define ROM_ITEM_DESCNOTAVAILABLE "(Not Available)"
|
#define ROM_ITEM_DESCNOTAVAILABLE TEXT("(Not Available)")
|
||||||
#define ROM_ITEM_COMPRESSEDROMDESCRIPTION ""
|
#define ROM_ITEM_COMPRESSEDROMDESCRIPTION TEXT("")
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
|
|
||||||
#define SETTINGS_TITLE_SELECTFOLDER "Select Folder"
|
#define SETTINGS_TITLE_SELECTFOLDER TEXT("Select Folder")
|
||||||
#define SETTINGS_OPTION_DIRECTORY_ROMS "Roms"
|
#define SETTINGS_OPTION_DIRECTORY_ROMS TEXT("Roms")
|
||||||
#define SETTINGS_OPTION_DIRECTORY_SCREENS "Screenshots"
|
#define SETTINGS_OPTION_DIRECTORY_SCREENS TEXT("Screenshots")
|
||||||
#define SETTINGS_OPTION_DIRECTORY_MOVIES "Movies"
|
#define SETTINGS_OPTION_DIRECTORY_MOVIES TEXT("Movies")
|
||||||
#define SETTINGS_OPTION_DIRECTORY_SPCS "SPCs"
|
#define SETTINGS_OPTION_DIRECTORY_SPCS TEXT("SPCs")
|
||||||
#define SETTINGS_OPTION_DIRECTORY_SAVES "Saves"
|
#define SETTINGS_OPTION_DIRECTORY_SAVES TEXT("Saves")
|
||||||
#define SETTINGS_OPTION_DIRECTORY_SRAM "SRAM"
|
#define SETTINGS_OPTION_DIRECTORY_SRAM TEXT("SRAM")
|
||||||
#define SETTINGS_OPTION_DIRECTORY_PATCHESANDCHEATS "Patch&Cheat"
|
#define SETTINGS_OPTION_DIRECTORY_PATCHESANDCHEATS TEXT("Patch&Cheat")
|
||||||
#define SETTINGS_OPTION_DIRECTORY_BIOS "BIOS files"
|
#define SETTINGS_OPTION_DIRECTORY_BIOS TEXT("BIOS files")
|
||||||
|
|
||||||
// Misc.
|
// Misc.
|
||||||
|
|
||||||
#define INPUT_INFO_DISPLAY_ENABLED "Input display enabled."
|
#define INPUT_INFO_DISPLAY_ENABLED "Input display enabled."
|
||||||
#define INPUT_INFO_DISPLAY_DISABLED "Input display disabled."
|
#define INPUT_INFO_DISPLAY_DISABLED "Input display disabled."
|
||||||
|
|
||||||
#define FILE_INFO_AVI_FILE_TYPE "AVI file"
|
#define FILE_INFO_AVI_FILE_TYPE TEXT("AVI file")
|
||||||
#define FILE_INFO_TXT_FILE_TYPE "Text file"
|
#define FILE_INFO_TXT_FILE_TYPE TEXT("Text file")
|
||||||
#define FILE_INFO_ROM_FILE_TYPE "ROM files or archives"
|
#define FILE_INFO_ROM_FILE_TYPE TEXT("ROM files or archives")
|
||||||
#define FILE_INFO_UNCROM_FILE_TYPE "Uncompressed ROM files"
|
#define FILE_INFO_UNCROM_FILE_TYPE TEXT("Uncompressed ROM files")
|
||||||
#define FILE_INFO_ANY_FILE_TYPE "All files"
|
#define FILE_INFO_ANY_FILE_TYPE TEXT("All files")
|
||||||
|
|
||||||
#define ERR_ROM_NOT_FOUND "ROM image \"%s\" was not found or could not be opened."
|
#define ERR_ROM_NOT_FOUND "ROM image \"%s\" was not found or could not be opened."
|
||||||
#define SRM_SAVE_FAILED "Failed to save SRM file."
|
#define SRM_SAVE_FAILED "Failed to save SRM file."
|
||||||
|
|
||||||
|
#define INFO_SAVE_SPC "Saving SPC Data."
|
||||||
|
|
||||||
#define CHEATS_INFO_ENABLED "Cheats enabled."
|
#define CHEATS_INFO_ENABLED "Cheats enabled."
|
||||||
#define CHEATS_INFO_DISABLED "Cheats disabled."
|
#define CHEATS_INFO_DISABLED "Cheats disabled."
|
||||||
#define CHEATS_INFO_ENABLED_NONE "Cheats enabled. (None are active.)"
|
#define CHEATS_INFO_ENABLED_NONE "Cheats enabled. (None are active.)"
|
||||||
|
|
||||||
#define MULTICART_BIOS_NOT_FOUND "not found!"
|
#define MULTICART_BIOS_NOT_FOUND TEXT("not found!")
|
||||||
#define MULTICART_BIOS_FOUND ""
|
#define MULTICART_BIOS_FOUND TEXT("")
|
||||||
|
|
||||||
#define ABOUT_DIALOG_TITLE "About "
|
#define ABOUT_DIALOG_TITLE TEXT("About ")
|
||||||
|
1453
win32/wsnes9x.cpp
1453
win32/wsnes9x.cpp
File diff suppressed because it is too large
Load Diff
@ -192,6 +192,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <windowsx.h>
|
#include <windowsx.h>
|
||||||
|
#include <tchar.h>
|
||||||
#include <ddraw.h>
|
#include <ddraw.h>
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
#ifndef __BORLANDC__
|
#ifndef __BORLANDC__
|
||||||
@ -211,6 +212,15 @@ extern unsigned char* SoundBuffer;
|
|||||||
#define MAX_RECENT_GAMES_LIST_SIZE 32
|
#define MAX_RECENT_GAMES_LIST_SIZE 32
|
||||||
#define MAX_RECENT_HOSTS_LIST_SIZE 16
|
#define MAX_RECENT_HOSTS_LIST_SIZE 16
|
||||||
|
|
||||||
|
#include "_tfwopen.h"
|
||||||
|
#ifdef UNICODE
|
||||||
|
#define _tToChar WideToUtf8
|
||||||
|
#define _tFromChar Utf8ToWide
|
||||||
|
#else
|
||||||
|
#define _tToChar
|
||||||
|
#define _tFromChar
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
inline static void Log (const char *str)
|
inline static void Log (const char *str)
|
||||||
{
|
{
|
||||||
@ -262,7 +272,8 @@ enum RenderFilter{
|
|||||||
|
|
||||||
enum OutputMethod {
|
enum OutputMethod {
|
||||||
DIRECTDRAW = 0,
|
DIRECTDRAW = 0,
|
||||||
DIRECT3D
|
DIRECT3D,
|
||||||
|
OPENGL
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dMode
|
struct dMode
|
||||||
@ -279,7 +290,6 @@ struct sGUI {
|
|||||||
HINSTANCE hInstance;
|
HINSTANCE hInstance;
|
||||||
|
|
||||||
DWORD hFrameTimer;
|
DWORD hFrameTimer;
|
||||||
//DWORD hSoundTimer;
|
|
||||||
DWORD hHotkeyTimer;
|
DWORD hHotkeyTimer;
|
||||||
HANDLE ClientSemaphore;
|
HANDLE ClientSemaphore;
|
||||||
HANDLE FrameTimerSemaphore;
|
HANDLE FrameTimerSemaphore;
|
||||||
@ -287,11 +297,7 @@ struct sGUI {
|
|||||||
|
|
||||||
BYTE Language;
|
BYTE Language;
|
||||||
|
|
||||||
//unsigned long PausedFramesBeforeMutingSound;
|
//Graphic Settings
|
||||||
/*int Width;
|
|
||||||
int Height;
|
|
||||||
int Depth;
|
|
||||||
int RefreshRate;*/
|
|
||||||
dMode FullscreenMode;
|
dMode FullscreenMode;
|
||||||
RenderFilter Scale;
|
RenderFilter Scale;
|
||||||
RenderFilter ScaleHiRes;
|
RenderFilter ScaleHiRes;
|
||||||
@ -300,6 +306,18 @@ struct sGUI {
|
|||||||
bool Stretch;
|
bool Stretch;
|
||||||
bool HeightExtend;
|
bool HeightExtend;
|
||||||
bool AspectRatio;
|
bool AspectRatio;
|
||||||
|
OutputMethod outputMethod;
|
||||||
|
int AspectWidth;
|
||||||
|
bool EmulateFullscreen;
|
||||||
|
bool EmulatedFullscreen;
|
||||||
|
bool BilinearFilter;
|
||||||
|
bool LocalVidMem;
|
||||||
|
bool Vsync;
|
||||||
|
bool shaderEnabled;
|
||||||
|
TCHAR HLSLshaderFileName[MAX_PATH];
|
||||||
|
TCHAR GLSLvertexShaderFileName[MAX_PATH];
|
||||||
|
TCHAR GLSLfragmentShaderFileName[MAX_PATH];
|
||||||
|
|
||||||
bool ScreenCleared;
|
bool ScreenCleared;
|
||||||
bool IgnoreNextMouseMove;
|
bool IgnoreNextMouseMove;
|
||||||
RECT window_size;
|
RECT window_size;
|
||||||
@ -346,46 +364,33 @@ struct sGUI {
|
|||||||
int SoundDriver;
|
int SoundDriver;
|
||||||
int SoundBufferSize;
|
int SoundBufferSize;
|
||||||
bool Mute;
|
bool Mute;
|
||||||
|
// used for sync sound synchronization
|
||||||
|
CRITICAL_SECTION SoundCritSect;
|
||||||
|
|
||||||
char RomDir [_MAX_PATH];
|
TCHAR RomDir [_MAX_PATH];
|
||||||
char ScreensDir [_MAX_PATH];
|
TCHAR ScreensDir [_MAX_PATH];
|
||||||
char MovieDir [_MAX_PATH];
|
TCHAR MovieDir [_MAX_PATH];
|
||||||
char SPCDir [_MAX_PATH];
|
TCHAR SPCDir [_MAX_PATH];
|
||||||
char FreezeFileDir [_MAX_PATH];
|
TCHAR FreezeFileDir [_MAX_PATH];
|
||||||
char SRAMFileDir [_MAX_PATH];
|
TCHAR SRAMFileDir [_MAX_PATH];
|
||||||
char PatchDir [_MAX_PATH];
|
TCHAR PatchDir [_MAX_PATH];
|
||||||
char BiosDir [_MAX_PATH];
|
TCHAR BiosDir [_MAX_PATH];
|
||||||
bool LockDirectories;
|
bool LockDirectories;
|
||||||
|
|
||||||
char RecentGames [MAX_RECENT_GAMES_LIST_SIZE][MAX_PATH];
|
TCHAR RecentGames [MAX_RECENT_GAMES_LIST_SIZE][MAX_PATH];
|
||||||
char RecentHostNames [MAX_RECENT_HOSTS_LIST_SIZE][MAX_PATH];
|
TCHAR RecentHostNames [MAX_RECENT_HOSTS_LIST_SIZE][MAX_PATH];
|
||||||
|
|
||||||
//turbo switches -- SNES-wide
|
//turbo switches -- SNES-wide
|
||||||
unsigned short TurboMask;
|
unsigned short TurboMask;
|
||||||
char StarOceanPack[MAX_PATH];
|
|
||||||
char SFA2PALPack[MAX_PATH];
|
|
||||||
char SFA2NTSCPack[MAX_PATH];
|
|
||||||
char SFZ2Pack[MAX_PATH];
|
|
||||||
char SJNSPack[MAX_PATH];
|
|
||||||
char FEOEZPack[MAX_PATH];
|
|
||||||
char SPL4Pack[MAX_PATH];
|
|
||||||
char MDHPack[MAX_PATH];
|
|
||||||
COLORREF InfoColor;
|
COLORREF InfoColor;
|
||||||
bool HideMenu;
|
bool HideMenu;
|
||||||
bool BilinearFilter;
|
|
||||||
bool LocalVidMem;
|
|
||||||
bool Vsync; // XXX: unused - OV2: used in Direct3D mode
|
|
||||||
// avi writing
|
// avi writing
|
||||||
struct AVIFile* AVIOut;
|
struct AVIFile* AVIOut;
|
||||||
OutputMethod outputMethod;
|
|
||||||
int AspectWidth;
|
|
||||||
bool EmulateFullscreen;
|
|
||||||
bool EmulatedFullscreen;
|
|
||||||
long FrameCount;
|
long FrameCount;
|
||||||
long LastFrameCount;
|
long LastFrameCount;
|
||||||
unsigned long IdleCount;
|
unsigned long IdleCount;
|
||||||
// used for sync sound synchronization
|
|
||||||
CRITICAL_SECTION SoundCritSect;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//TURBO masks
|
//TURBO masks
|
||||||
@ -568,5 +573,6 @@ void S9xSetWinPixelFormat ();
|
|||||||
const char* GetFilterName(RenderFilter filterID);
|
const char* GetFilterName(RenderFilter filterID);
|
||||||
int GetFilterScale(RenderFilter filterID);
|
int GetFilterScale(RenderFilter filterID);
|
||||||
bool GetFilterHiResSupport(RenderFilter filterID);
|
bool GetFilterHiResSupport(RenderFilter filterID);
|
||||||
|
const TCHAR * S9xGetDirectoryT (enum s9x_getdirtype);
|
||||||
|
|
||||||
#endif // !defined(SNES9X_H_INCLUDED)
|
#endif // !defined(SNES9X_H_INCLUDED)
|
||||||
|
38
win32/zlib/zlib.sln
Normal file
38
win32/zlib/zlib.sln
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
|
# Visual Studio 2008
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcproj", "{99E9817A-4605-44AF-8433-7048F0EC1859}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
LIB Debug S9xUnicode|Win32 = LIB Debug S9xUnicode|Win32
|
||||||
|
LIB Debug S9xUnicode|x64 = LIB Debug S9xUnicode|x64
|
||||||
|
LIB Debug|Win32 = LIB Debug|Win32
|
||||||
|
LIB Debug|x64 = LIB Debug|x64
|
||||||
|
LIB Release S9xUnicode|Win32 = LIB Release S9xUnicode|Win32
|
||||||
|
LIB Release S9xUnicode|x64 = LIB Release S9xUnicode|x64
|
||||||
|
LIB Release|Win32 = LIB Release|Win32
|
||||||
|
LIB Release|x64 = LIB Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Debug S9xUnicode|Win32.ActiveCfg = LIB Debug S9xUnicode|Win32
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Debug S9xUnicode|Win32.Build.0 = LIB Debug S9xUnicode|Win32
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Debug S9xUnicode|x64.ActiveCfg = LIB Debug S9xUnicode|x64
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Debug S9xUnicode|x64.Build.0 = LIB Debug S9xUnicode|x64
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Debug|Win32.Build.0 = LIB Debug|Win32
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Debug|x64.ActiveCfg = LIB Debug|x64
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Debug|x64.Build.0 = LIB Debug|x64
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Release S9xUnicode|Win32.ActiveCfg = LIB Release S9xUnicode|Win32
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Release S9xUnicode|Win32.Build.0 = LIB Release S9xUnicode|Win32
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Release S9xUnicode|x64.ActiveCfg = LIB Release S9xUnicode|x64
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Release S9xUnicode|x64.Build.0 = LIB Release S9xUnicode|x64
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Release|Win32.ActiveCfg = LIB Release|Win32
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Release|Win32.Build.0 = LIB Release|Win32
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Release|x64.ActiveCfg = LIB Release|x64
|
||||||
|
{99E9817A-4605-44AF-8433-7048F0EC1859}.LIB Release|x64.Build.0 = LIB Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
723
win32/zlib/zlib.vcproj
Normal file
723
win32/zlib/zlib.vcproj
Normal file
@ -0,0 +1,723 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9,00"
|
||||||
|
Name="zlib"
|
||||||
|
ProjectGUID="{99E9817A-4605-44AF-8433-7048F0EC1859}"
|
||||||
|
RootNamespace="zlib"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="196613"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="LIB Debug|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)..\..\..\zlib\lib"
|
||||||
|
IntermediateDirectory="$(OutDir)..\..\..\zlib\lib\ZLIB_Debug"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="0"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
ForcedIncludeFiles="$(SolutionDir)..\_tfwopen.h"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
Culture="1033"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="$(OutDir)\zlibdmt.lib"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="LIB Debug|x64"
|
||||||
|
OutputDirectory="$(SolutionDir)..\..\..\zlib\lib"
|
||||||
|
IntermediateDirectory="$(OutDir)..\..\..\zlib\lib\ZLIB_Debug_x64"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="0"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
ForcedIncludeFiles="$(SolutionDir)..\_tfwopen.h"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
Culture="1033"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="$(OutDir)\zlibdmtx64.lib"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="LIB Release|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)..\..\..\zlib\lib"
|
||||||
|
IntermediateDirectory="$(OutDir)..\..\..\zlib\lib\ZLIB_Release"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="0"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="2"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableFunctionLevelLinking="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
ForcedIncludeFiles="$(SolutionDir)..\_tfwopen.h"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="$(OutDir)\zlibmt.lib"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="LIB Release|x64"
|
||||||
|
OutputDirectory="$(SolutionDir)..\..\..\zlib\lib"
|
||||||
|
IntermediateDirectory="$(OutDir)..\..\..\zlib\lib\ZLIB_Release_x64"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="0"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="2"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableFunctionLevelLinking="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
ForcedIncludeFiles="$(SolutionDir)..\_tfwopen.h"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="$(OutDir)\zlibmt.lib"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="LIB Debug S9xUnicode|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)..\..\..\zlib\lib"
|
||||||
|
IntermediateDirectory="$(OutDir)..\..\..\zlib\lib\ZLIB_Debug_U"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
ForcedIncludeFiles="$(SolutionDir)..\_tfwopen.h"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
Culture="1033"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="$(OutDir)\zlibdmtu.lib"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="LIB Debug S9xUnicode|x64"
|
||||||
|
OutputDirectory="$(SolutionDir)..\..\..\zlib\lib"
|
||||||
|
IntermediateDirectory="$(OutDir)..\..\..\zlib\lib\ZLIB_Debug_U_x64"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
ForcedIncludeFiles="$(SolutionDir)..\_tfwopen.h"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
Culture="1033"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="$(OutDir)\zlibdmtux64.lib"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="LIB Release S9xUnicode|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)..\..\..\zlib\lib"
|
||||||
|
IntermediateDirectory="$(OutDir)..\..\..\zlib\lib\ZLIB_Release_U"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="1"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="2"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableFunctionLevelLinking="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
ForcedIncludeFiles="$(SolutionDir)..\_tfwopen.h"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="$(OutDir)\zlibmtu.lib"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="LIB Release S9xUnicode|x64"
|
||||||
|
OutputDirectory="$(SolutionDir)..\..\..\zlib\lib"
|
||||||
|
IntermediateDirectory="$(OutDir)..\..\..\zlib\lib\ZLIB_Release_U_x64"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="1"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="2"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
EnableFunctionLevelLinking="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
ForcedIncludeFiles="$(SolutionDir)..\_tfwopen.h"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="$(OutDir)\zlibmtux64.lib"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\adler32.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\compress.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\crc32.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\deflate.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\gzio.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\infback.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\inffast.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\inflate.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\inftrees.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\trees.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\uncompr.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\win32\zlib.def"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="LIB Debug|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="LIB Debug|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="LIB Release|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="LIB Release|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="LIB Debug S9xUnicode|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="LIB Debug S9xUnicode|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="LIB Release S9xUnicode|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="LIB Release S9xUnicode|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\zutil.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\crc32.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\deflate.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\inffast.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\inffixed.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\inflate.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\inftrees.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\trees.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\zconf.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\zlib.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\zutil.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\zlib\win32\zlib1.rc"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
Loading…
Reference in New Issue
Block a user