diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp index c472842584..bb7627b56c 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp @@ -218,7 +218,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 PanicAlert("Cant read from DVD_Plugin - DVD-Interface: Fatal Error"); } - FileMon::CheckFile(std::string(pFilename), m_pFileSystem->GetFileSize(pFilename)); + FileMon::CheckFile(std::string(pFilename), (int)m_pFileSystem->GetFileSize(pFilename)); } break; diff --git a/Source/Core/VideoCommon/Src/BPFunctions.h b/Source/Core/VideoCommon/Src/BPFunctions.h index ea735351a0..3825fd9f58 100644 --- a/Source/Core/VideoCommon/Src/BPFunctions.h +++ b/Source/Core/VideoCommon/Src/BPFunctions.h @@ -46,7 +46,6 @@ void SetDitherMode(const BPCmd &bp); void SetLogicOpMode(const BPCmd &bp); void SetColorMask(const BPCmd &bp); void CopyEFB(const BPCmd &bp, const EFBRectangle &rc, const u32 &address, const bool &fromZBuffer, const bool &isIntensityFmt, const u32 ©fmt, const int &scaleByHalf); -void RenderToXFB(const BPCmd &bp, const EFBRectangle &rc, const float &yScale, const float &xfbLines, u32 xfbAddr, const u32 &dstWidth, const u32 &dstHeight); void ClearScreen(const BPCmd &bp, const EFBRectangle &rc); void RestoreRenderState(const BPCmd &bp); u8 *GetPointer(const u32 &address); diff --git a/Source/Core/VideoCommon/Src/BPStructs.cpp b/Source/Core/VideoCommon/Src/BPStructs.cpp index 8b817c0621..9c031f0a71 100644 --- a/Source/Core/VideoCommon/Src/BPStructs.cpp +++ b/Source/Core/VideoCommon/Src/BPStructs.cpp @@ -19,6 +19,7 @@ #include "Profiler.h" #include "Statistics.h" +#include "Render.h" #include "VideoCommon.h" #include "PixelShaderManager.h" #include "BPFunctions.h" @@ -40,6 +41,12 @@ void BPInit() bpmem.bpMask = 0xFFFFFF; } + +void RenderToXFB(const BPCmd &bp, const EFBRectangle &rc, float yScale, float xfbLines, u32 xfbAddr, const u32 dstWidth, const u32 dstHeight) +{ + Renderer::RenderToXFB(xfbAddr, dstWidth, dstHeight, rc); +} + void BPWritten(const BPCmd& bp) { /* diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp index 4e55902088..75bc8dc31b 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp @@ -67,8 +67,8 @@ void GetPixelShaderId(PIXELSHADERUID &uid, u32 texturemask, u32 dstAlphaEnable) TevStageCombiner::ColorCombiner &cc = bpmem.combiners[i].colorC; TevStageCombiner::AlphaCombiner &ac = bpmem.combiners[i].alphaC; - u32 val0 = cc.hex&0xffffff; - u32 val1 = ac.hex&0xffffff; + u32 val0 = cc.hex & 0xffffff; + u32 val1 = ac.hex & 0xffffff; val0 |= bpmem.tevksel[i / 2].getKC(i & 1) << 24; val1 |= bpmem.tevksel[i / 2].getKA(i & 1) << 24; pcurvalue[0] = val0; diff --git a/Source/Core/VideoCommon/Src/Render.h b/Source/Core/VideoCommon/Src/Render.h index 598ab9595c..d21dbcf5d4 100644 --- a/Source/Core/VideoCommon/Src/Render.h +++ b/Source/Core/VideoCommon/Src/Render.h @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ - // --------------------------------------------------------------------------------------------- // GC graphics pipeline // --------------------------------------------------------------------------------------------- @@ -33,9 +32,13 @@ #include "MathUtil.h" #include "pluginspecs_video.h" +// TODO: Move these out of here. extern int frameCount; extern int OSDChoice, OSDTime, OSDInternalW, OSDInternalH; +// Renderer really isn't a very good name for this class - it's more like "Misc". +// The long term goal is to get rid of this class and replace it with others that make +// more sense. class Renderer { public: @@ -48,8 +51,6 @@ public: static void ReinitView(); - static void SwapBuffers(); - static void SetColorMask(); static void SetBlendMode(bool forceUpdate); static bool SetScissorRect(); diff --git a/Source/Core/VideoCommon/Src/Statistics.h b/Source/Core/VideoCommon/Src/Statistics.h index 1061041e7f..c6329f4059 100644 --- a/Source/Core/VideoCommon/Src/Statistics.h +++ b/Source/Core/VideoCommon/Src/Statistics.h @@ -17,7 +17,6 @@ #include "CommonTypes.h" #include "VideoCommon.h" -#include "Render.h" // for EFBRectangle.h, unfortunately. #include #ifndef _STATISTICS_H diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp index e95503a2f8..aa561512b7 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.cpp +++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp @@ -97,6 +97,7 @@ void VideoConfig::Load(const char *ini_file) iniFile.Get("Hardware", "WindowedRes", &iWindowedRes, 0); iniFile.Get("Hardware", "VSync", &bVsync, 0); iniFile.Get("Hardware", "FullscreenRes", &iFSResolution, 0); + iniFile.Get("Hardware", "SimpleFB", &bSimpleFB, false); // Load common settings iniFile.Load(CONFIG_FILE); @@ -175,12 +176,11 @@ void VideoConfig::Save(const char *ini_file) iniFile.Set("Hardware", "WindowedRes", iWindowedRes); iniFile.Set("Hardware", "VSync", bVsync); iniFile.Set("Hardware", "FullscreenRes", iFSResolution); + iniFile.Set("Hardware", "SimpleFB", bSimpleFB); iniFile.Save(ini_file); } - - // TODO: Figure out a better place for this function. void ComputeDrawRectangle(int backbuffer_width, int backbuffer_height, bool flip, TargetRectangle *rc) { @@ -198,8 +198,8 @@ void ComputeDrawRectangle(int backbuffer_width, int backbuffer_height, bool flip { // The rendering window aspect ratio as a proportion of the 4:3 or 16:9 ratio float Ratio = (WinWidth / WinHeight) / (g_Config.bKeepAR43 ? (4.0f / 3.0f) : (16.0f / 9.0f)); - // Check if height or width is the limiting factor. If ratio > 1 the picture is to wide and have to limit the width. - if (Ratio > 1) + // Check if height or width is the limiting factor. If ratio > 1 the picture is too wide and have to limit the width. + if (Ratio > 1.0f) { // Scale down and center in the X direction. FloatGLWidth /= Ratio; @@ -230,12 +230,8 @@ void ComputeDrawRectangle(int backbuffer_width, int backbuffer_height, bool flip // Adjust the X and Y offset FloatXOffset = FloatXOffset - (IncreasedWidth * 0.5f); FloatYOffset = FloatYOffset - (IncreasedHeight * 0.5f); - //NOTICE_LOG(OSREPORT, "Crop Ratio:%1.2f IncreasedHeight:%3.0f YOffset:%3.0f", Ratio, IncreasedHeight, FloatYOffset); - //NOTICE_LOG(OSREPORT, "Crop FloatGLWidth:%1.2f FloatGLHeight:%3.0f", (float)FloatGLWidth, (float)FloatGLHeight); - //NOTICE_LOG(OSREPORT, ""); } - // round(float) = floor(float + 0.5) int XOffset = (int)(FloatXOffset + 0.5f); int YOffset = (int)(FloatYOffset + 0.5f); rc->left = XOffset; diff --git a/Source/Core/VideoCommon/Src/VideoConfig.h b/Source/Core/VideoCommon/Src/VideoConfig.h index c78b8d2dba..be4383f72c 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.h +++ b/Source/Core/VideoCommon/Src/VideoConfig.h @@ -131,9 +131,6 @@ struct VideoConfig // With this enabled, the plugin renders directly to the backbuffer. Many features are // disabled but it might be faster on really old GPUs. bool bSimpleFB; - - // Runtime detection config - bool bOldCard; }; extern VideoConfig g_Config; diff --git a/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj b/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj index 7c04eebbf2..a22d21f53a 100644 --- a/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj +++ b/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj @@ -1190,6 +1190,14 @@ + + + + diff --git a/Source/Plugins/Plugin_VideoDX9/Src/BPFunctions.cpp b/Source/Plugins/Plugin_VideoDX9/Src/BPFunctions.cpp index eaff8df1be..27604dc163 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/BPFunctions.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/BPFunctions.cpp @@ -217,13 +217,6 @@ void CopyEFB(const BPCmd &bp, const EFBRectangle &rc, const u32 &address, const } } -void RenderToXFB(const BPCmd &bp, const EFBRectangle &rc, const float &yScale, const float &xfbLines, u32 xfbAddr, const u32 &dstWidth, const u32 &dstHeight) -{ - Renderer::SwapBuffers(); - PRIM_LOG("Renderer::SwapBuffers()"); - g_VideoInitialize.pCopiedToXFB(false); -} - void ClearScreen(const BPCmd &bp, const EFBRectangle &rc) { // TODO: Scale EFBRectangle correctly @@ -306,7 +299,7 @@ void SetSamplerState(const BPCmd &bp) if (g_ActiveConfig.iMaxAnisotropy > 1) { - mag = D3DTEXF_ANISOTROPIC; + mag = D3DTEXF_LINEAR; min = D3DTEXF_ANISOTROPIC; mip = D3DTEXF_LINEAR; } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.cpp b/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.cpp index 42e258ab48..e8cd0fcf44 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.cpp @@ -16,6 +16,7 @@ // http://code.google.com/p/dolphin-emu/ #include "D3DBase.h" +#include "VideoConfig.h" #include "Render.h" #include "XFStructs.h" @@ -24,7 +25,8 @@ namespace D3D LPDIRECT3D9 D3D = NULL; // Used to create the D3DDevice LPDIRECT3DDEVICE9 dev = NULL; // Our rendering device -LPDIRECT3DSURFACE9 backBuffer; +LPDIRECT3DSURFACE9 back_buffer; +LPDIRECT3DSURFACE9 back_buffer_z; D3DCAPS9 caps; HWND hWnd; @@ -117,7 +119,7 @@ void EnableAlphaToCoverage() xres = pp->BackBufferWidth = client.right - client.left; yres = pp->BackBufferHeight = client.bottom - client.top; pp->SwapEffect = D3DSWAPEFFECT_DISCARD; - pp->PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; + pp->PresentationInterval = g_Config.bVSync ? D3DPRESENT_INTERVAL_DEFAULT : D3DPRESENT_INTERVAL_IMMEDIATE; pp->Windowed = TRUE; } } @@ -251,7 +253,8 @@ void EnableAlphaToCoverage() } } dev->GetDeviceCaps(&caps); - dev->GetRenderTarget(0, &backBuffer); + dev->GetRenderTarget(0, &back_buffer); + dev->GetDepthStencilSurface(&back_buffer_z); // Device state would normally be set here return S_OK; @@ -284,7 +287,12 @@ const char *PixelShaderVersionString() LPDIRECT3DSURFACE9 GetBackBufferSurface() { - return backBuffer; + return back_buffer; +} + +LPDIRECT3DSURFACE9 GetBackBufferDepthSurface() +{ + return back_buffer_z; } void ShowD3DError(HRESULT err) @@ -305,10 +313,17 @@ void ShowD3DError(HRESULT err) { if (dev) { + // Can't keep a pointer around to the backbuffer surface when resetting. + back_buffer_z->Release(); + back_buffer->Release(); D3DPRESENT_PARAMETERS d3dpp; InitPP(cur_adapter, resolution, multisample, &d3dpp); + HRESULT hr = dev->Reset(&d3dpp); + ShowD3DError(hr); + dev->GetRenderTarget(0, &back_buffer); + dev->GetDepthStencilSurface(&back_buffer_z); } } @@ -317,12 +332,12 @@ void ShowD3DError(HRESULT err) return fullScreen; } - int GetDisplayWidth() + int GetBackBufferWidth() { return xres; } - int GetDisplayHeight() + int GetBackBufferHeight() { return yres; } @@ -332,7 +347,7 @@ void ShowD3DError(HRESULT err) nextFullScreen = fullscreen; } - bool BeginFrame(bool clear, u32 color, float z) + bool BeginFrame() { if (bFrameInProgress) { @@ -342,8 +357,6 @@ void ShowD3DError(HRESULT err) bFrameInProgress = true; if (dev) { - if (clear) - dev->Clear(0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER|D3DCLEAR_STENCIL, (DWORD)color, z, 0 ); dev->BeginScene(); return true; } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.h b/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.h index e5cccb4903..fdfa1d5d72 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DBase.h @@ -37,13 +37,16 @@ void Shutdown(); extern IDirect3DDevice9 *dev; void Reset(); -bool BeginFrame(bool clear, u32 color, float z); +bool BeginFrame(); void EndFrame(); void SwitchFullscreen(bool fullscreen); bool IsFullscreen(); -int GetDisplayWidth(); -int GetDisplayHeight(); + +int GetBackBufferWidth(); +int GetBackBufferHeight(); LPDIRECT3DSURFACE9 GetBackBufferSurface(); +LPDIRECT3DSURFACE9 GetBackBufferDepthSurface(); + const D3DCAPS9 &GetCaps(); const char *PixelShaderVersionString(); const char *VertexShaderVersionString(); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.cpp b/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.cpp index 996ca4701b..ed1d982f98 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.cpp @@ -36,21 +36,19 @@ LPDIRECT3DTEXTURE9 CreateTexture2D(const u8* buffer, const int width, const int } HRESULT hr; - // TODO(ector): allow mipmaps for non-pow textures on newer cards? + // TODO(ector): Allow mipmaps for non-pow textures on newer cards? + // TODO(ector): Use the game-specified mipmaps? if (!isPow2) hr = dev->CreateTexture(width, height, 1, 0, fmt, D3DPOOL_MANAGED, &pTexture, NULL); else hr = dev->CreateTexture(width, height, 0, D3DUSAGE_AUTOGENMIPMAP, fmt, D3DPOOL_MANAGED, &pTexture, NULL); - if(FAILED(hr)) + if (FAILED(hr)) return 0; - int level = 0; - D3DLOCKED_RECT Lock; - pTexture->LockRect(level, &Lock, NULL, 0 ); - - switch(fmt) + pTexture->LockRect(level, &Lock, NULL, 0); + switch (fmt) { case D3DFMT_L8: case D3DFMT_A8: @@ -150,26 +148,4 @@ void ReplaceTexture2D(LPDIRECT3DTEXTURE9 pTexture, const u8* buffer, const int w pTexture->UnlockRect(level); } -LPDIRECT3DTEXTURE9 CreateRenderTarget(const int width, const int height) -{ - LPDIRECT3DTEXTURE9 tex; - HRESULT hr = dev->CreateTexture(width,height,0,D3DUSAGE_RENDERTARGET | D3DUSAGE_AUTOGENMIPMAP,D3DFMT_A8R8G8B8,D3DPOOL_DEFAULT,&tex,NULL); - - if (FAILED(hr)) - return 0; - else - return tex; -} - -LPDIRECT3DSURFACE9 CreateDepthStencilSurface(const int width, const int height) -{ - LPDIRECT3DSURFACE9 surf; - HRESULT hr = dev->CreateDepthStencilSurface(width,height,D3DFMT_D24S8,D3DMULTISAMPLE_NONE,0,0,&surf,0); - - if (FAILED(hr)) - return 0; - else - return surf; -} - } // namespace diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp b/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp index 13a1e53524..9b664858cf 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp @@ -51,11 +51,14 @@ namespace D3D int CD3DFont::Init() { - m_fTextScale = 1.0f; // Draw fonts into texture without scaling - // Create a new texture for the font - HRESULT hr = dev->CreateTexture(m_dwTexWidth, m_dwTexHeight, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, &m_pTexture, NULL); - if (FAILED(hr)) + // Create vertex buffer for the letters + HRESULT hr; + if (FAILED(hr = dev->CreateVertexBuffer(MAX_NUM_VERTICES*sizeof(FONT2DVERTEX), + D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, 0, D3DPOOL_DEFAULT, &m_pVB, NULL))) + { return hr; + } + m_fTextScale = 1.0f; // Draw fonts into texture without scaling // Prepare to create a bitmap int *pBitmapBits; @@ -76,15 +79,13 @@ namespace D3D // Create a font. By specifying ANTIALIASED_QUALITY, we might get an // antialiased font, but this is not guaranteed. // We definitely don't want to get it cleartype'd, anyway. - int m_dwFontHeight = 36; - + int m_dwFontHeight = 24; int nHeight = -MulDiv(m_dwFontHeight, int(GetDeviceCaps(hDC, LOGPIXELSY) * m_fTextScale), 72); int dwBold = FW_NORMAL; ///FW_BOLD HFONT hFont = CreateFont(nHeight, 0, 0, 0, dwBold, 0, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH, _T("Tahoma")); - if (NULL == hFont) return E_FAIL; @@ -99,43 +100,48 @@ namespace D3D // Loop through all printable character and output them to the bitmap.. // Meanwhile, keep track of the corresponding tex coords for each character. int x = 0, y = 0; - char str[2] = "\0"; - SIZE size; - - for (char c=0; c<127-32; c++) + for (int c = 0; c < 127 - 32; c++) { - str[0] = c+32; + str[0] = c + 32; + SIZE size; GetTextExtentPoint32A(hDC, str, 1, &size); - if ((int)(x+size.cx+1) > m_dwTexWidth) { x = 0; - y += size.cy+1; + y += size.cy + 1; } ExtTextOutA(hDC, x+1, y+0, ETO_OPAQUE | ETO_CLIPPED, NULL, str, 1, NULL); - m_fTexCoords[c][0] = ((float)(x+0))/m_dwTexWidth; m_fTexCoords[c][1] = ((float)(y+0))/m_dwTexHeight; m_fTexCoords[c][2] = ((float)(x+0+size.cx))/m_dwTexWidth; m_fTexCoords[c][3] = ((float)(y+0+size.cy))/m_dwTexHeight; - x += size.cx+3; //3 to avoid annoying ij conflict (part of the j ends up with the i) + x += size.cx + 3; //3 to work around annoying ij conflict (part of the j ends up with the i) + } + + // Create a new texture for the font + hr = dev->CreateTexture(m_dwTexWidth, m_dwTexHeight, 1, D3DUSAGE_DYNAMIC, + D3DFMT_A4R4G4B4, D3DPOOL_DEFAULT, &m_pTexture, NULL); + if (FAILED(hr)) + { + PanicAlert("Failed to create font texture"); + return hr; } // Lock the surface and write the alpha values for the set pixels D3DLOCKED_RECT d3dlr; - m_pTexture->LockRect(0, &d3dlr, 0, 0); - unsigned short* pDst16 = (unsigned short*)d3dlr.pBits; + m_pTexture->LockRect(0, &d3dlr, 0, D3DLOCK_DISCARD); int bAlpha; // 4-bit measure of pixel intensity - for (y=0; y < m_dwTexHeight; y++) + for (y = 0; y < m_dwTexHeight; y++) { - for (x=0; x < m_dwTexWidth; x++) + u16 *pDst16 = (u16*)((u8 *)d3dlr.pBits + y * d3dlr.Pitch); + for (x = 0; x < m_dwTexWidth; x++) { - bAlpha = ((pBitmapBits[m_dwTexWidth*y + x] & 0xff) >> 4); - *pDst16++ = (bAlpha << 12) | 0x0fff; + bAlpha = ((pBitmapBits[m_dwTexWidth * y + x] & 0xff) >> 4); + pDst16[x] = (bAlpha << 12) | 0x0fff; } } @@ -148,14 +154,6 @@ namespace D3D SelectObject(hDC, hOldFont); DeleteObject(hFont); - // Create vertex buffer for the letters - if (FAILED(hr = dev->CreateVertexBuffer(MAX_NUM_VERTICES*sizeof(FONT2DVERTEX), - D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, 0, - D3DPOOL_DEFAULT, &m_pVB,NULL))) - { - return hr; - } - return S_OK; } @@ -191,13 +189,12 @@ namespace D3D static DWORD RS_old[6]; static DWORD TS_old[6]; static LPDIRECT3DBASETEXTURE9 texture_old; - static DWORD FVF_old; - static LPDIRECT3DVERTEXDECLARATION9 decl_old; static LPDIRECT3DPIXELSHADER9 ps_old; static LPDIRECT3DVERTEXSHADER9 vs_old; void SaveRenderStates() { + // TODO: Get rid of these Gets so we can potentially switch to Pure Device for (int i = 0; i < 6; i++) { dev->GetRenderState((_D3DRENDERSTATETYPE)RS[i][0], &(RS_old[i])); @@ -206,8 +203,20 @@ namespace D3D dev->GetTexture(0, &texture_old); dev->GetPixelShader(&ps_old); dev->GetVertexShader(&vs_old); - dev->GetVertexDeclaration(&decl_old); - dev->GetFVF(&FVF_old); + } + + void RestoreRenderStates() + { + D3D::SetTexture(0, texture_old); + + dev->SetPixelShader(ps_old); + dev->SetVertexShader(vs_old); + + for (int i = 0; i < 6; i++) + { + D3D::SetRenderState((_D3DRENDERSTATETYPE)RS[i][0], RS_old[i]); + D3D::SetTextureStageState(0, (_D3DTEXTURESTAGESTATETYPE)int(TS[i][0]), TS_old[i]); + } } void CD3DFont::SetRenderStates() @@ -226,24 +235,12 @@ namespace D3D } } - void RestoreRenderStates() - { - D3D::SetTexture(0, texture_old); - - dev->SetPixelShader(ps_old); - dev->SetVertexShader(vs_old); - - dev->SetFVF(FVF_old); - - for (int i = 0; i < 6; i++) - { - D3D::SetRenderState((_D3DRENDERSTATETYPE)RS[i][0], RS_old[i]); - D3D::SetTextureStageState(0, (_D3DTEXTURESTAGESTATETYPE)int(TS[i][0]), TS_old[i]); - } - } int CD3DFont::DrawTextScaled(float x, float y, float fXScale, float fYScale, float spacing, u32 dwColor, const char* strText, bool center) { + if (!m_pVB) + return 0; + SaveRenderStates(); SetRenderStates(); dev->SetStreamSource(0, m_pVB, 0, sizeof(FONT2DVERTEX)); @@ -283,10 +280,10 @@ namespace D3D float w = (tx2-tx1)*m_dwTexWidth; w *= (fXScale*vpHeight)*invLineHeight; mx += w + spacing*fXScale*vpWidth; - if (mx>maxx) maxx=mx; + if (mx > maxx) maxx = mx; } - float offset=-maxx/2; + float offset = -maxx/2; strText = oldstrText; //Then let's draw it if (center) @@ -295,10 +292,10 @@ namespace D3D fStartX+=offset; } - float wScale=(fXScale*vpHeight)*invLineHeight; - float hScale=(fYScale*vpHeight)*invLineHeight; + float wScale = (fXScale*vpHeight)*invLineHeight; + float hScale = (fYScale*vpHeight)*invLineHeight; - while(*strText) + while (*strText) { char c = *strText++; @@ -322,28 +319,24 @@ namespace D3D w *= wScale; h *= hScale; - FONT2DVERTEX v[6]; - v[0]=InitFont2DVertex(sx, sy+h, dwColor, tx1, ty2); - v[1]=InitFont2DVertex(sx, sy, dwColor, tx1, ty1); - v[2]=InitFont2DVertex(sx+w, sy+h, dwColor, tx2, ty2); - v[3]=InitFont2DVertex(sx+w, sy, dwColor, tx2, ty1); - v[4]=v[2]; - v[5]=v[1]; + v[0] = InitFont2DVertex(sx, sy+h, dwColor, tx1, ty2); + v[1] = InitFont2DVertex(sx, sy, dwColor, tx1, ty1); + v[2] = InitFont2DVertex(sx+w, sy+h, dwColor, tx2, ty2); + v[3] = InitFont2DVertex(sx+w, sy, dwColor, tx2, ty1); + v[4] = v[2]; + v[5] = v[1]; - memcpy(pVertices,v,6*sizeof(FONT2DVERTEX)); + memcpy(pVertices, v, 6*sizeof(FONT2DVERTEX)); pVertices+=6; dwNumTriangles += 2; - if (dwNumTriangles * 3 > (MAX_NUM_VERTICES-6)) + if (dwNumTriangles * 3 > (MAX_NUM_VERTICES - 6)) { // Unlock, render, and relock the vertex buffer m_pVB->Unlock(); - - // dev->DrawPrimitive(D3DPT_TRIANGLELIST, 0, dwNumTriangles); dev->DrawPrimitive(D3DPT_TRIANGLELIST, 0, dwNumTriangles); - m_pVB->Lock(0, 0, (void**)&pVertices, D3DLOCK_DISCARD); dwNumTriangles = 0; } @@ -354,10 +347,7 @@ namespace D3D // Unlock and render the vertex buffer m_pVB->Unlock(); if (dwNumTriangles > 0) - { - // dev->DrawPrimitive(D3DPT_TRIANGLELIST, 0, dwNumTriangles); dev->DrawPrimitive(D3DPT_TRIANGLELIST, 0, dwNumTriangles); - } RestoreRenderStates(); return S_OK; } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Debugger/Debugger.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Debugger/Debugger.cpp index 8b89752464..6e40d909f3 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Debugger/Debugger.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Debugger/Debugger.cpp @@ -298,7 +298,7 @@ void DX9Debugger_Pause_Count_N(PauseEvent event,bool update) if (update) { D3D::EndFrame(); - D3D::BeginFrame(false, 0x00000000, 1.0f); + D3D::BeginFrame(); } DX9DebuggerCheckAndPause(); } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp index b0406d9448..f59b73ca65 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp @@ -86,17 +86,34 @@ struct TabDirect3D : public W32Util::Tab CheckDlgButton(hDlg, IDC_FULLSCREENENABLE, g_Config.bFullscreen ? TRUE : FALSE); CheckDlgButton(hDlg, IDC_VSYNC, g_Config.bVsync ? TRUE : FALSE); CheckDlgButton(hDlg, IDC_RENDER_TO_MAINWINDOW, g_Config.RenderToMainframe ? TRUE : FALSE); + CheckDlgButton(hDlg, IDC_ASPECT_16_9, g_Config.bKeepAR169 ? TRUE : FALSE); + CheckDlgButton(hDlg, IDC_ASPECT_4_3, g_Config.bKeepAR43 ? TRUE : FALSE); + CheckDlgButton(hDlg, IDC_WIDESCREEN_HACK, g_Config.bWidescreenHack ? TRUE : FALSE); } void Command(HWND hDlg,WPARAM wParam) { - /* switch (LOWORD(wParam)) { + case IDC_ASPECT_4_3: + Button_SetCheck(GetDlgItem(hDlg, IDC_ASPECT_16_9), FALSE); + g_Config.bKeepAR43 = Button_GetCheck(GetDlgItem(hDlg, IDC_ASPECT_4_3)) ? true : false; + g_Config.bKeepAR169 = false; + break; + case IDC_ASPECT_16_9: + Button_SetCheck(GetDlgItem(hDlg, IDC_ASPECT_4_3), FALSE); + g_Config.bKeepAR169 = Button_GetCheck(GetDlgItem(hDlg, IDC_ASPECT_16_9)) ? true : false; + g_Config.bKeepAR43 = false; + break; + case IDC_WIDESCREEN_HACK: + g_Config.bWidescreenHack = Button_GetCheck(GetDlgItem(hDlg, IDC_WIDESCREEN_HACK)) ? true : false; + break; + case IDC_WIREFRAME: + g_Config.bWireFrame = Button_GetCheck(GetDlgItem(hDlg,IDC_WIREFRAME)) ? true : false; + break; default: break; } - */ } void Apply(HWND hDlg) @@ -133,9 +150,6 @@ struct TabAdvanced : public W32Util::Tab Button_SetCheck(GetDlgItem(hDlg,IDC_TEXFMT_OVERLAY), g_Config.bTexFmtOverlayEnable); Button_SetCheck(GetDlgItem(hDlg,IDC_TEXFMT_CENTER), g_Config.bTexFmtOverlayCenter); Button_GetCheck(GetDlgItem(hDlg,IDC_TEXFMT_OVERLAY)) ? Button_Enable(GetDlgItem(hDlg,IDC_TEXFMT_CENTER), true) : Button_Enable(GetDlgItem(hDlg,IDC_TEXFMT_CENTER), false); - - //SetWindowText(GetDlgItem(hDlg,IDC_TEXDUMPPATH),g_Config.texDumpPath.c_str()); <-- Old method - //Edit_LimitText(GetDlgItem(hDlg,IDC_TEXDUMPPATH),255); <-- Old method } void Command(HWND hDlg,WPARAM wParam) { @@ -149,7 +163,7 @@ struct TabAdvanced : public W32Util::Tab // break; case IDC_TEXFMT_OVERLAY: { - Button_GetCheck(GetDlgItem(hDlg,IDC_TEXFMT_OVERLAY)) ? Button_Enable(GetDlgItem(hDlg,IDC_TEXFMT_CENTER), true) : Button_Enable(GetDlgItem(hDlg,IDC_TEXFMT_CENTER), false); + Button_GetCheck(GetDlgItem(hDlg, IDC_TEXFMT_OVERLAY)) ? Button_Enable(GetDlgItem(hDlg,IDC_TEXFMT_CENTER), true) : Button_Enable(GetDlgItem(hDlg,IDC_TEXFMT_CENTER), false); } break; default: @@ -163,7 +177,6 @@ struct TabAdvanced : public W32Util::Tab g_Config.bOverlayStats = Button_GetCheck(GetDlgItem(hDlg,IDC_OVERLAYSTATS)) ? true : false; g_Config.bOverlayProjStats = Button_GetCheck(GetDlgItem(hDlg,IDC_OVERLAYPROJSTATS)) ? true : false; - g_Config.bWireFrame = Button_GetCheck(GetDlgItem(hDlg,IDC_WIREFRAME)) ? true : false; g_Config.bDumpTextures = Button_GetCheck(GetDlgItem(hDlg,IDC_TEXDUMP)) ? true : false; g_Config.bDumpFrames = Button_GetCheck(GetDlgItem(hDlg,IDC_DUMPFRAMES)) ? true : false; g_Config.bShowShaderErrors = Button_GetCheck(GetDlgItem(hDlg,IDC_SHOWSHADERERRORS)) ? true : false; @@ -240,7 +253,7 @@ void DlgSettings_Show(HINSTANCE hInstance, HWND _hParent) #endif #endif - if(( tfoe != g_Config.bTexFmtOverlayEnable) || + if ((tfoe != g_Config.bTexFmtOverlayEnable) || ((g_Config.bTexFmtOverlayEnable) && ( tfoc != g_Config.bTexFmtOverlayCenter))) { TextureCache::Invalidate(false); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp b/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp index 43cdbbbef3..542f04c482 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp @@ -15,11 +15,18 @@ HINSTANCE m_hInstance = NULL; WNDCLASSEX wndClass; const TCHAR m_szClassName[] = _T("DolphinEmuWnd"); int g_winstyle; +static volatile bool s_sizing; + +bool IsSizing() +{ + return s_sizing; +} HWND GetWnd() { return m_hWnd; } + HWND GetParentWnd() { return m_hParent; @@ -38,6 +45,14 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam ) } return 0; + case WM_ENTERSIZEMOVE: + s_sizing = true; + break; + + case WM_EXITSIZEMOVE: + s_sizing = false; + break; + case WM_KEYDOWN: switch( LOWORD( wParam )) { diff --git a/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.h b/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.h index 3b575636df..6577203883 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.h @@ -5,12 +5,15 @@ namespace EmuWindow { - HWND GetWnd(); - HWND GetParentWnd(); - HWND Create(HWND hParent, HINSTANCE hInstance, const TCHAR *title); - void Show(); - void Close(); - void SetSize(int displayWidth, int displayHeight); + +HWND GetWnd(); +HWND GetParentWnd(); +HWND Create(HWND hParent, HINSTANCE hInstance, const TCHAR *title); +void Show(); +void Close(); +void SetSize(int displayWidth, int displayHeight); +bool IsSizing(); + } #endif diff --git a/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp b/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp new file mode 100644 index 0000000000..aa53e58dc4 --- /dev/null +++ b/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp @@ -0,0 +1,55 @@ +// Copyright (C) 2003 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + +#include "D3DBase.h" +#include "Render.h" +#include "FramebufferManager.h" + +namespace FBManager +{ + +static LPDIRECT3DSURFACE9 s_efb_color_surface; +static LPDIRECT3DSURFACE9 s_efb_depth_surface; + +#undef CHECK +#define CHECK(hr) if (FAILED(hr)) { PanicAlert("FAIL: " __FUNCTION__); } + +LPDIRECT3DSURFACE9 GetEFBColorRTSurface() { return s_efb_color_surface; } +LPDIRECT3DSURFACE9 GetEFBDepthRTSurface() { return s_efb_depth_surface; } + +void Create() +{ + // Simplest possible setup to start with. + int target_width = Renderer::GetTargetWidth(); + int target_height = Renderer::GetTargetHeight(); + HRESULT hr = D3D::dev->CreateRenderTarget(target_width, target_height, D3DFMT_A8R8G8B8, + D3DMULTISAMPLE_NONE, 0, FALSE, &s_efb_color_surface, NULL); + CHECK(hr); + hr = D3D::dev->CreateDepthStencilSurface(target_width, target_height, D3DFMT_D24S8, + D3DMULTISAMPLE_NONE, 0, FALSE, &s_efb_depth_surface, NULL); + CHECK(hr); +} + +void Destroy() +{ + s_efb_depth_surface->Release(); + s_efb_depth_surface = NULL; + s_efb_color_surface->Release(); + s_efb_color_surface = NULL; +} + +} // namespace \ No newline at end of file diff --git a/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.h b/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.h new file mode 100644 index 0000000000..9f09e39dd0 --- /dev/null +++ b/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.h @@ -0,0 +1,60 @@ +// Copyright (C) 2003 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + +#ifndef _FRAMEBUFFERMANAGER_D3D_H_ +#define _FRAMEBUFFERMANAGER_D3D_H_ + +#include +#include "D3DBase.h" + +namespace FBManager +{ + +void Create(); +void Destroy(); + +// To get the EFB in texture form, these functions may have to transfer +// the EFB to a resolved texture first. +LPDIRECT3DTEXTURE9 GetEFBColorTexture(const EFBRectangle& sourceRc); +LPDIRECT3DTEXTURE9 GetEFBDepthTexture(const EFBRectangle& sourceRc); + +LPDIRECT3DSURFACE9 GetEFBColorRTSurface(); +LPDIRECT3DSURFACE9 GetEFBDepthRTSurface(); + + +/* +// Resolved framebuffer is only used in MSAA mode. +LPDIRECT3DTEXTURE9 GetResolvedFramebuffer() const { return m_resolvedFramebuffer; } + +TargetRectangle ConvertEFBRectangle(const EFBRectangle& rc) const; + +void SetFramebuffer(LPDIRECT3DSURFACE9 surface); + +// If in MSAA mode, this will perform a resolve of the specified rectangle, and return the resolve target as a texture ID. +// Thus, this call may be expensive. Don't repeat it unnecessarily. +// If not in MSAA mode, will just return the render target texture ID. +// After calling this, before you render anything else, you MUST bind the framebuffer you want to draw to. +LPDIRECT3DTEXTURE9 ResolveAndGetRenderTarget(const EFBRectangle &rect); + +// Same as above but for the depth Target. +// After calling this, before you render anything else, you MUST bind the framebuffer you want to draw to. +LPDIRECT3DTEXTURE9 ResolveAndGetDepthTarget(const EFBRectangle &rect); +*/ + +}; + +#endif diff --git a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp index 088f22faa4..5b6fa691b4 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp @@ -63,19 +63,24 @@ void SetPSConstant4fv(int const_number, const float *f) void PixelShaderCache::Init() { - //memset(lastPSconstants,0xFF,(C_COLORMATRIX+16)*4*sizeof(float)); // why does this not work - //memset(lastPSconstants,0xFF,sizeof(lastPSconstants)); - for( int i=0;i<(C_COLORMATRIX+16)*4;i++) - lastPSconstants[i/4][i%4] = -100000000.0f; - memset(&last_pixel_shader_uid,0xFF,sizeof(last_pixel_shader_uid)); + Clear(); } -void PixelShaderCache::Shutdown() +void PixelShaderCache::Clear() { PSCache::iterator iter = PixelShaders.begin(); for (; iter != PixelShaders.end(); iter++) iter->second.Destroy(); PixelShaders.clear(); + + for (int i = 0; i < (C_COLORMATRIX + 16) * 4; i++) + lastPSconstants[i/4][i%4] = -100000000.0f; + memset(&last_pixel_shader_uid, 0xFF, sizeof(last_pixel_shader_uid)); +} + +void PixelShaderCache::Shutdown() +{ + Clear(); } bool PixelShaderCache::SetShader(bool dstAlpha) @@ -86,7 +91,8 @@ bool PixelShaderCache::SetShader(bool dstAlpha) GetPixelShaderId(uid, PixelShaderManager::GetTextureMask(), dstAlpha); if (uid == last_pixel_shader_uid) { - if (PixelShaders[uid].shader) + PSCache::const_iterator iter = PixelShaders.find(uid); + if (iter != PixelShaders.end() && iter->second.shader) return true; else return false; @@ -129,7 +135,6 @@ bool PixelShaderCache::SetShader(bool dstAlpha) INCSTAT(stats.numPixelShadersCreated); SETSTAT(stats.numPixelShadersAlive, (int)PixelShaders.size()); - if (shader) { D3D::dev->SetPixelShader(shader); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.h b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.h index 23c32a8e10..b9e84b45bd 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.h @@ -44,6 +44,7 @@ private: { if (shader) shader->Release(); + shader = NULL; } }; @@ -55,6 +56,7 @@ private: public: static void Init(); static void Cleanup(); + static void Clear(); static void Shutdown(); static bool SetShader(bool dstAlpha); #if defined(_DEBUG) || defined(DEBUGFAST) diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp index 89e1aa525b..df83e6ebe5 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp @@ -33,17 +33,19 @@ #include "PixelShaderManager.h" #include "VertexShaderCache.h" #include "PixelShaderCache.h" +#include "VertexLoaderManager.h" #include "TextureCache.h" #include "Utils.h" #include "EmuWindow.h" #include "AVIDump.h" #include "OnScreenDisplay.h" +#include "FramebufferManager.h" #include "Fifo.h" #include "debugger/debugger.h" -static int s_targetWidth; -static int s_targetHeight; +static int s_target_width; +static int s_target_height; static int s_backbuffer_width; static int s_backbuffer_height; @@ -60,23 +62,46 @@ static bool s_AVIDumping; #define NUMWNDRES 6 extern int g_Res[NUMWNDRES][2]; +void SetupDeviceObjects() +{ + D3D::font.Init(); + VertexLoaderManager::Init(); + FBManager::Create(); +} + +// Kill off all POOL_DEFAULT device objects. +void TeardownDeviceObjects() +{ + FBManager::Destroy(); + D3D::font.Shutdown(); + TextureCache::Invalidate(false); + VertexManager::DestroyDeviceObjects(); + VertexLoaderManager::Shutdown(); + VertexShaderCache::Clear(); + PixelShaderCache::Clear(); + + D3D::dev->SetRenderTarget(0, D3D::GetBackBufferSurface()); + D3D::dev->SetDepthStencilSurface(D3D::GetBackBufferDepthSurface()); +} + bool Renderer::Init() { UpdateActiveConfig(); EmuWindow::SetSize(g_Res[g_ActiveConfig.iWindowedRes][0], g_Res[g_ActiveConfig.iWindowedRes][1]); - int backbuffer_ms_mode = g_ActiveConfig.iMultisampleMode; + int backbuffer_ms_mode = 0; // g_ActiveConfig.iMultisampleMode; D3D::Create(g_ActiveConfig.iAdapter, EmuWindow::GetWnd(), g_ActiveConfig.bFullscreen, g_ActiveConfig.iFSResolution, backbuffer_ms_mode); - s_targetWidth = D3D::GetDisplayWidth(); - s_targetHeight = D3D::GetDisplayHeight(); + s_backbuffer_width = D3D::GetBackBufferWidth(); + s_backbuffer_height = D3D::GetBackBufferHeight(); - s_backbuffer_width = s_targetWidth; - s_backbuffer_height = s_targetHeight; + // TODO: Grab target width from configured resolution? + s_target_width = s_backbuffer_width * EFB_WIDTH / 640; + s_target_height = s_backbuffer_height * EFB_HEIGHT / 480; - xScale = (float)s_targetWidth / (float)EFB_WIDTH; - yScale = (float)s_targetHeight / (float)EFB_HEIGHT; + xScale = (float)s_target_width / (float)EFB_WIDTH; + yScale = (float)s_target_height / (float)EFB_HEIGHT; s_LastFrameDumped = false; s_AVIDumping = false; @@ -87,18 +112,26 @@ bool Renderer::Init() D3DXMatrixIdentity(&mtx); D3D::dev->SetTransform(D3DTS_VIEW, &mtx); D3D::dev->SetTransform(D3DTS_WORLD, &mtx); - D3D::font.Init(); + + SetupDeviceObjects(); for (int i = 0; i < 8; i++) D3D::dev->SetSamplerState(i, D3DSAMP_MAXANISOTROPY, 16); - D3D::BeginFrame(true, 0, 1.0f); + D3D::dev->Clear(0, NULL, D3DCLEAR_TARGET, 0x0, 0, 0); + + D3D::dev->SetRenderTarget(0, FBManager::GetEFBColorRTSurface()); + D3D::dev->SetDepthStencilSurface(FBManager::GetEFBDepthRTSurface()); + + D3D::dev->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER | D3DCLEAR_STENCIL, 0x0, 1.0f, 0); + + D3D::BeginFrame(); return true; } void Renderer::Shutdown() { - D3D::font.Shutdown(); + TeardownDeviceObjects(); D3D::EndFrame(); D3D::Close(); @@ -108,14 +141,10 @@ void Renderer::Shutdown() } } -float Renderer::GetTargetScaleX() -{ - return xScale; -} -float Renderer::GetTargetScaleY() -{ - return yScale; -} +int Renderer::GetTargetWidth() { return s_target_width; } +int Renderer::GetTargetHeight() { return s_target_height; } +float Renderer::GetTargetScaleX() { return xScale; } +float Renderer::GetTargetScaleY() { return yScale; } void Renderer::RenderText(const char *text, int left, int top, u32 color) { @@ -135,10 +164,10 @@ void dumpMatrix(D3DXMATRIX &mtx) TargetRectangle Renderer::ConvertEFBRectangle(const EFBRectangle& rc) { TargetRectangle result; - result.left = (rc.left * s_targetWidth) / EFB_WIDTH; - result.top = (rc.top * s_targetHeight) / EFB_HEIGHT; - result.right = (rc.right * s_targetWidth) / EFB_WIDTH; - result.bottom = (rc.bottom * s_targetHeight) / EFB_HEIGHT; + result.left = (rc.left * s_target_width) / EFB_WIDTH; + result.top = (rc.top * s_target_height) / EFB_HEIGHT; + result.right = (rc.right * s_target_width) / EFB_WIDTH; + result.bottom = (rc.bottom * s_target_height) / EFB_HEIGHT; return result; } @@ -156,14 +185,14 @@ void formatBufferDump(const char *in, char *out, int w, int h, int p) } } -void Renderer::SwapBuffers() +void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc) { if (g_bSkipCurrentFrame) return; - // Center window again. if (EmuWindow::GetParentWnd()) { + // Re-stretch window to parent window size again, if it has a parent window. RECT rcWindow; GetWindowRect(EmuWindow::GetParentWnd(), &rcWindow); @@ -173,7 +202,7 @@ void Renderer::SwapBuffers() ::MoveWindow(EmuWindow::GetWnd(), 0, 0, width, height, FALSE); } - // Frame dumping routine + // Frame dumping routine - seems buggy and wrong, esp. regarding buffer sizes if (g_ActiveConfig.bDumpFrames) { D3DDISPLAYMODE DisplayMode; if (SUCCEEDED(D3D::dev->GetDisplayMode(0, &DisplayMode))) { @@ -214,7 +243,7 @@ void Renderer::SwapBuffers() } else { - if(s_LastFrameDumped && s_AVIDumping) { + if (s_LastFrameDumped && s_AVIDumping) { AVIDump::Stop(); s_AVIDumping = false; } @@ -222,6 +251,18 @@ void Renderer::SwapBuffers() s_LastFrameDumped = false; } + D3D::dev->SetRenderTarget(0, D3D::GetBackBufferSurface()); + D3D::dev->SetDepthStencilSurface(NULL); + + // Blit our render target onto the backbuffer. + // TODO: Change to a quad so we can do post processing. + TargetRectangle src_rect, dst_rect; + src_rect = ConvertEFBRectangle(sourceRc); + ComputeDrawRectangle(s_backbuffer_width, s_backbuffer_height, false, &dst_rect); + D3D::dev->StretchRect(FBManager::GetEFBColorRTSurface(), src_rect.AsRECT(), + D3D::GetBackBufferSurface(), dst_rect.AsRECT(), + D3DTEXF_LINEAR); + char st[8192]; // Finish up the current frame, print some stats if (g_ActiveConfig.bOverlayStats) @@ -237,20 +278,6 @@ void Renderer::SwapBuffers() } OSD::DrawMessages(); - -#if defined(DVPROFILE) - if (g_bWriteProfile) { - //g_bWriteProfile = 0; - static int framenum = 0; - const int UPDATE_FRAMES = 8; - if (++framenum >= UPDATE_FRAMES) { - DVProfWrite("prof.txt", UPDATE_FRAMES); - DVProfClear(); - framenum = 0; - } - } -#endif - D3D::EndFrame(); DEBUGGER_PAUSE_COUNT_N_WITHOUT_UPDATE(NEXT_FRAME); @@ -265,53 +292,57 @@ void Renderer::SwapBuffers() // Make any new configuration settings active. UpdateActiveConfig(); - /* - TODO: Resize backbuffer if window size has changed. This code crashes, debug it. + // TODO: Resize backbuffer if window size has changed. This code crashes, debug it. + + while (EmuWindow::IsSizing()) + { + Sleep(10); + } RECT rcWindow; GetClientRect(EmuWindow::GetWnd(), &rcWindow); if (rcWindow.right - rcWindow.left != s_backbuffer_width || rcWindow.bottom - rcWindow.top != s_backbuffer_height) { - D3D::Reset(); - s_backbuffer_width = D3D::GetDisplayWidth(); - s_backbuffer_height = D3D::GetDisplayHeight(); - } - */ + TeardownDeviceObjects(); - //Begin new frame - //Set default viewport and scissor, for the clear to work correctly + D3D::Reset(); + + SetupDeviceObjects(); + s_backbuffer_width = D3D::GetBackBufferWidth(); + s_backbuffer_height = D3D::GetBackBufferHeight(); + } + + g_VideoInitialize.pCopiedToXFB(false); + + // Begin new frame + // Set default viewport and scissor, for the clear to work correctly stats.ResetFrame(); + // u32 clearColor = (bpmem.clearcolorAR << 16) | bpmem.clearcolorGB; + D3D::BeginFrame(); + D3D::dev->Clear(0, NULL, D3DCLEAR_TARGET, 0x0, 1.0f, 0); + + D3D::dev->SetRenderTarget(0, FBManager::GetEFBColorRTSurface()); + D3D::dev->SetDepthStencilSurface(FBManager::GetEFBDepthRTSurface()); + D3DVIEWPORT9 vp; vp.X = 0; vp.Y = 0; - vp.Width = (DWORD)s_targetWidth; - vp.Height = (DWORD)s_targetHeight; + vp.Width = (DWORD)s_target_width; + vp.Height = (DWORD)s_target_height; vp.MinZ = 0; vp.MaxZ = 1.0f; D3D::dev->SetViewport(&vp); + RECT rc; rc.left = 0; rc.top = 0; - rc.right = (LONG)s_targetWidth; - rc.bottom = (LONG)s_targetHeight; + rc.right = (LONG)s_target_width; + rc.bottom = (LONG)s_target_height; D3D::dev->SetScissorRect(&rc); D3D::dev->SetRenderState(D3DRS_SCISSORTESTENABLE, false); - // We probably shouldn't clear here. - // D3D::dev->Clear(0, 0, D3DCLEAR_TARGET, 0x00000000, 0, 0); - - u32 clearColor = (bpmem.clearcolorAR << 16) | bpmem.clearcolorGB; - D3D::BeginFrame(false, clearColor, 1.0f); - - // This probably causes problems, and the visual difference is tiny anyway. - // So let's keep it commented out. - // D3D::EnableAlphaToCoverage(); - UpdateViewport(); - - if (g_ActiveConfig.bOldCard) - D3D::font.SetRenderStates(); //compatibility with low end cards } bool Renderer::SetScissorRect() @@ -328,6 +359,12 @@ bool Renderer::SetScissorRect() rc.top = (int)(rc.top * yScale); rc.right = (int)(rc.right * xScale); rc.bottom = (int)(rc.bottom * yScale); + + if (rc.left < 0) rc.left = 0; + if (rc.right > s_target_width) rc.right = s_target_width; + if (rc.top < 0) rc.top = 0; + if (rc.bottom > s_target_height) rc.bottom = s_target_height; + if (rc.right >= rc.left && rc.bottom >= rc.top) { D3D::dev->SetScissorRect(&rc); @@ -422,14 +459,13 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y) // and perhaps blending. // WARN_LOG(VIDEOINTERFACE, "This is probably some kind of software rendering"); break; - } return 0; } -// mtx.m[0][3] = pMatrix[1]; // -0.5f/s_targetWidth; <-- fix d3d pixel center? -// mtx.m[1][3] = pMatrix[3]; // +0.5f/s_targetHeight; <-- fix d3d pixel center? +// mtx.m[0][3] = pMatrix[1]; // -0.5f/s_target_width; <-- fix d3d pixel center? +// mtx.m[1][3] = pMatrix[3]; // +0.5f/s_target_height; <-- fix d3d pixel center? // Called from VertexShaderManager void UpdateViewport() @@ -452,5 +488,9 @@ void UpdateViewport() vp.MinZ = (xfregs.rawViewport[5] - xfregs.rawViewport[2]) / 16777215.0f; vp.MaxZ = xfregs.rawViewport[5] / 16777215.0f; + // This seems to happen a lot - the above calc is probably wrong. + if (vp.MinZ < 0.0f) vp.MinZ = 0.0f; + if (vp.MaxZ > 1.0f) vp.MaxZ = 1.0f; + D3D::dev->SetViewport(&vp); } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp index 0b659d8596..bc8035b876 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp @@ -27,6 +27,7 @@ #include "D3DBase.h" #include "D3DTexture.h" +#include "FramebufferManager.h" #include "Render.h" @@ -104,8 +105,7 @@ TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width, { if (address == 0) return NULL; - - + u8 *ptr = g_VideoInitialize.pGetMemoryPointer(address); int palSize = TexDecoder_GetPaletteSize(format); @@ -323,7 +323,7 @@ have_texture: LPDIRECT3DSURFACE9 srcSurface, destSurface; tex->GetSurfaceLevel(0, &destSurface); - srcSurface = D3D::GetBackBufferSurface(); + srcSurface = FBManager::GetEFBColorRTSurface(); D3D::dev->StretchRect(srcSurface, &source_rc, destSurface, &dest_rc, D3DTEXF_LINEAR); destSurface->Release(); } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.h b/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.h index 2fcb8c0639..6215b9d547 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.h @@ -30,6 +30,9 @@ void Shutdown(); void AddVertices(int _primitive, int _numVertices); void Flush(); +void CreateDeviceObjects(); +void DestroyDeviceObjects(); + } // namespace #endif diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp index cdba5f2f4b..d414d6c371 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp @@ -94,19 +94,24 @@ void SetMultiVSConstant4fv(int const_number, int count, const float *f) void VertexShaderCache::Init() { - //memset(lastVSconstants,0xFF,(C_FOGPARAMS+8)*4*sizeof(float)); // why does this not work - //memset(lastVSconstants,0xFF,sizeof(lastVSconstants)); - for( int i=0;i<(C_FOGPARAMS+8)*4;i++) - lastVSconstants[i/4][i%4] = -100000000.0f; - memset(&last_vertex_shader_uid,0xFF,sizeof(last_vertex_shader_uid)); + Clear(); +} + +void VertexShaderCache::Clear() +{ + VSCache::iterator iter = vshaders.begin(); + for (; iter != vshaders.end(); ++iter) + iter->second.Destroy(); + vshaders.clear(); + + for (int i = 0; i < (C_FOGPARAMS + 8) * 4; i++) + lastVSconstants[i / 4][i % 4] = -100000000.0f; + memset(&last_vertex_shader_uid, 0xFF, sizeof(last_vertex_shader_uid)); } void VertexShaderCache::Shutdown() { - VSCache::iterator iter = vshaders.begin(); - for (; iter != vshaders.end(); iter++) - iter->second.Destroy(); - vshaders.clear(); + Clear(); } bool VertexShaderCache::SetShader(u32 components) diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.h b/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.h index 73e7d905de..8fc5d0cf56 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.h @@ -41,6 +41,7 @@ private: { if (shader) shader->Release(); + shader = NULL; } }; @@ -51,6 +52,7 @@ private: public: static void Init(); + static void Clear(); static void Cleanup(); static void Shutdown(); static bool SetShader(u32 components); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp index 4fa484cf71..fe699c98e7 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp @@ -61,7 +61,7 @@ GFXDebuggerDX9 *m_DebuggerFrame = NULL; HINSTANCE g_hInstance = NULL; SVideoInitialize g_VideoInitialize; PLUGIN_GLOBALS* globals = NULL; -int initCount = 0; +bool s_initialized; static u32 s_efbAccessRequested = FALSE; @@ -173,57 +173,6 @@ void UpdateFPSDisplay(const char *text) SetWindowTextA(EmuWindow::GetWnd(), temp); } - -bool Init() -{ - g_Config.Load(FULL_CONFIG_DIR "gfx_dx9.ini"); - g_Config.GameIniLoad(globals->game_ini); - UpdateProjectionHack(g_Config.iPhackvalue); // DX9 projection hack could be disabled by commenting out this line - - if (initCount == 0) - { - // create the window - if (!g_Config.RenderToMainframe || g_VideoInitialize.pWindowHandle == NULL) // ignore parent for this plugin - { - g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create(NULL, g_hInstance, _T("Loading - Please wait.")); - } - else - { - g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create((HWND)g_VideoInitialize.pWindowHandle, g_hInstance, _T("Loading - Please wait.")); - } - - if (g_VideoInitialize.pWindowHandle == NULL) - { - MessageBox(GetActiveWindow(), _T("An error has occurred while trying to create the window."), _T("Fatal Error"), MB_OK); - return false; - } - - EmuWindow::Show(); - g_VideoInitialize.pPeekMessages = Callback_PeekMessages; - g_VideoInitialize.pUpdateFPSDisplay = UpdateFPSDisplay; - - if (FAILED(D3D::Init())) - { - MessageBox(GetActiveWindow(), _T("Unable to initialize Direct3D. Please make sure that you have DirectX 9.0c correctly installed."), _T("Fatal Error"), MB_OK); - return false; - } - InitXFBConvTables(); - } - initCount++; - - return true; -} - -void DeInit() -{ - initCount--; - if (initCount == 0) - { - D3D::Shutdown(); - EmuWindow::Close(); - } -} - void GetDllInfo (PLUGIN_INFO* _PluginInfo) { _PluginInfo->Version = 0x0100; @@ -252,15 +201,9 @@ void DllAbout(HWND _hParent) void DllConfig(HWND _hParent) { // If not initialized, only init D3D so we can enumerate resolutions. - if (initCount == 0) - { - D3D::Init(); - } + if (!s_initialized) D3D::Init(); DlgSettings_Show(g_hInstance, _hParent); - if (initCount == 0) - { - D3D::Shutdown(); - } + if (!s_initialized) D3D::Shutdown(); } void Initialize(void *init) @@ -268,15 +211,38 @@ void Initialize(void *init) SVideoInitialize *_pVideoInitialize = (SVideoInitialize*)init; frameCount = 0; g_VideoInitialize = *_pVideoInitialize; - Init(); + + g_Config.Load(FULL_CONFIG_DIR "gfx_dx9.ini"); + g_Config.GameIniLoad(globals->game_ini); + UpdateProjectionHack(g_Config.iPhackvalue); // DX9 projection hack could be disabled by commenting out this line + + // create the window + if (!g_Config.RenderToMainframe || g_VideoInitialize.pWindowHandle == NULL) // ignore parent for this plugin + g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create(NULL, g_hInstance, _T("Loading - Please wait.")); + else + g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create((HWND)g_VideoInitialize.pWindowHandle, g_hInstance, _T("Loading - Please wait.")); + if (g_VideoInitialize.pWindowHandle == NULL) + { + ERROR_LOG(VIDEO, "An error has occurred while trying to create the window."); + return; + } + EmuWindow::Show(); + g_VideoInitialize.pPeekMessages = Callback_PeekMessages; + g_VideoInitialize.pUpdateFPSDisplay = UpdateFPSDisplay; + if (FAILED(D3D::Init())) + { + MessageBox(GetActiveWindow(), _T("Unable to initialize Direct3D. Please make sure that you have the latest version of DirectX 9.0c correctly installed."), _T("Fatal Error"), MB_OK); + return; + } + InitXFBConvTables(); + OSD::AddMessage("Dolphin Direct3D9 Video Plugin.", 5000); _pVideoInitialize->pPeekMessages = g_VideoInitialize.pPeekMessages; _pVideoInitialize->pUpdateFPSDisplay = g_VideoInitialize.pUpdateFPSDisplay; _pVideoInitialize->pWindowHandle = g_VideoInitialize.pWindowHandle; - - OSD::AddMessage("Dolphin Direct3D9 Video Plugin.", 5000); + s_initialized = true; } -void Video_Prepare(void) +void Video_Prepare() { Renderer::Init(); TextureCache::Init(); @@ -291,19 +257,23 @@ void Video_Prepare(void) PixelShaderManager::Init(); } -void Shutdown(void) +void Shutdown() { + s_efbAccessRequested = FALSE; + Fifo_Shutdown(); - OpcodeDecoder_Shutdown(); VertexManager::Shutdown(); - VertexShaderManager::Shutdown(); VertexLoaderManager::Shutdown(); VertexShaderCache::Shutdown(); + VertexShaderManager::Shutdown(); PixelShaderCache::Shutdown(); PixelShaderManager::Shutdown(); TextureCache::Shutdown(); + OpcodeDecoder_Shutdown(); Renderer::Shutdown(); - DeInit(); + D3D::Shutdown(); + EmuWindow::Close(); + s_initialized = false; } void DoState(unsigned char **ptr, int mode) { diff --git a/Source/Plugins/Plugin_VideoDX9/Src/resource.h b/Source/Plugins/Plugin_VideoDX9/Src/resource.h index 68f1ef9693..8cd042fa2c 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/resource.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/resource.h @@ -1,14 +1,1147 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. -// Used by resource.rc +// Used by Resource.rc // - -#define IDC_STATIC -1 +#define SW_HIDE 0 +#define HIDE_WINDOW 0 +#define WM_NULL 0x0000 +#define WA_INACTIVE 0 +#define HTNOWHERE 0 +#define SMTO_NORMAL 0x0000 +#define ICON_SMALL 0 +#define SIZE_RESTORED 0 +#define BN_CLICKED 0 +#define BST_UNCHECKED 0x0000 +#define HDS_HORZ 0x0000 +#define TBSTYLE_BUTTON 0x0000 +#define TBS_HORZ 0x0000 +#define TBS_BOTTOM 0x0000 +#define TBS_RIGHT 0x0000 +#define LVS_ICON 0x0000 +#define LVS_ALIGNTOP 0x0000 +#define TCS_TABS 0x0000 +#define TCS_SINGLELINE 0x0000 +#define TCS_RIGHTJUSTIFY 0x0000 +#define DTS_SHORTDATEFORMAT 0x0000 +#define PGS_VERT 0x00000000 +#define LANG_NEUTRAL 0x00 +#define SUBLANG_NEUTRAL 0x00 +#define SORT_DEFAULT 0x0 +#define SORT_JAPANESE_XJIS 0x0 +#define SORT_CHINESE_BIG5 0x0 +#define SORT_CHINESE_PRCP 0x0 +#define SORT_KOREAN_KSC 0x0 +#define SORT_HUNGARIAN_DEFAULT 0x0 +#define SORT_GEORGIAN_TRADITIONAL 0x0 +#define _USE_DECLSPECS_FOR_SAL 0 +#define _USE_ATTRIBUTES_FOR_SAL 0 +#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 +#define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID 1 +#define SW_SHOWNORMAL 1 +#define SW_NORMAL 1 +#define SHOW_OPENWINDOW 1 +#define SW_PARENTCLOSING 1 +#define VK_LBUTTON 0x01 +#define WM_CREATE 0x0001 +#define WA_ACTIVE 1 +#define PWR_OK 1 +#define PWR_SUSPENDREQUEST 1 +#define NFR_ANSI 1 +#define UIS_SET 1 +#define UISF_HIDEFOCUS 0x1 +#define XBUTTON1 0x0001 +#define WMSZ_LEFT 1 +#define HTCLIENT 1 +#define SMTO_BLOCK 0x0001 +#define MA_ACTIVATE 1 +#define ICON_BIG 1 +#define SIZE_MINIMIZED 1 +#define MK_LBUTTON 0x0001 +#define TME_HOVER 0x00000001 +#define CS_VREDRAW 0x0001 +#define CF_TEXT 1 +#define SCF_ISSECURE 0x00000001 +#define IDOK 1 +#define BN_PAINT 1 +#define BST_CHECKED 0x0001 +#define TBSTYLE_SEP 0x0001 +#define TTS_ALWAYSTIP 0x01 +#define TBS_AUTOTICKS 0x0001 +#define UDS_WRAP 0x0001 +#define PBS_SMOOTH 0x01 +#define LWS_TRANSPARENT 0x0001 +#define LVS_REPORT 0x0001 +#define TVS_HASBUTTONS 0x0001 +#define TCS_SCROLLOPPOSITE 0x0001 +#define ACS_CENTER 0x0001 +#define MCS_DAYSTATE 0x0001 +#define DTS_UPDOWN 0x0001 +#define PGS_HORZ 0x00000001 +#define NFS_EDIT 0x0001 +#define BCSIF_GLYPH 0x0001 +#define BCSS_NOSPLIT 0x0001 +#define LANG_ARABIC 0x01 +#define SUBLANG_DEFAULT 0x01 +#define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01 +#define SUBLANG_ALBANIAN_ALBANIA 0x01 +#define SUBLANG_ALSATIAN_FRANCE 0x01 +#define SUBLANG_AMHARIC_ETHIOPIA 0x01 +#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 +#define SUBLANG_ARMENIAN_ARMENIA 0x01 +#define SUBLANG_ASSAMESE_INDIA 0x01 +#define SUBLANG_AZERI_LATIN 0x01 +#define SUBLANG_BASHKIR_RUSSIA 0x01 +#define SUBLANG_BASQUE_BASQUE 0x01 +#define SUBLANG_BELARUSIAN_BELARUS 0x01 +#define SUBLANG_BENGALI_INDIA 0x01 +#define SUBLANG_BRETON_FRANCE 0x01 +#define SUBLANG_BULGARIAN_BULGARIA 0x01 +#define SUBLANG_CATALAN_CATALAN 0x01 +#define SUBLANG_CHINESE_TRADITIONAL 0x01 +#define SUBLANG_CORSICAN_FRANCE 0x01 +#define SUBLANG_CZECH_CZECH_REPUBLIC 0x01 +#define SUBLANG_CROATIAN_CROATIA 0x01 +#define SUBLANG_DANISH_DENMARK 0x01 +#define SUBLANG_DARI_AFGHANISTAN 0x01 +#define SUBLANG_DIVEHI_MALDIVES 0x01 +#define SUBLANG_DUTCH 0x01 +#define SUBLANG_ENGLISH_US 0x01 +#define SUBLANG_ESTONIAN_ESTONIA 0x01 +#define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01 +#define SUBLANG_FILIPINO_PHILIPPINES 0x01 +#define SUBLANG_FINNISH_FINLAND 0x01 +#define SUBLANG_FRENCH 0x01 +#define SUBLANG_FRISIAN_NETHERLANDS 0x01 +#define SUBLANG_GALICIAN_GALICIAN 0x01 +#define SUBLANG_GEORGIAN_GEORGIA 0x01 +#define SUBLANG_GERMAN 0x01 +#define SUBLANG_GREEK_GREECE 0x01 +#define SUBLANG_GREENLANDIC_GREENLAND 0x01 +#define SUBLANG_GUJARATI_INDIA 0x01 +#define SUBLANG_HAUSA_NIGERIA_LATIN 0x01 +#define SUBLANG_HEBREW_ISRAEL 0x01 +#define SUBLANG_HINDI_INDIA 0x01 +#define SUBLANG_HUNGARIAN_HUNGARY 0x01 +#define SUBLANG_ICELANDIC_ICELAND 0x01 +#define SUBLANG_IGBO_NIGERIA 0x01 +#define SUBLANG_INDONESIAN_INDONESIA 0x01 +#define SUBLANG_INUKTITUT_CANADA 0x01 +#define SUBLANG_ITALIAN 0x01 +#define SUBLANG_JAPANESE_JAPAN 0x01 +#define SUBLANG_KANNADA_INDIA 0x01 +#define SUBLANG_KAZAK_KAZAKHSTAN 0x01 +#define SUBLANG_KHMER_CAMBODIA 0x01 +#define SUBLANG_KICHE_GUATEMALA 0x01 +#define SUBLANG_KINYARWANDA_RWANDA 0x01 +#define SUBLANG_KONKANI_INDIA 0x01 +#define SUBLANG_KOREAN 0x01 +#define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01 +#define SUBLANG_LAO_LAO 0x01 +#define SUBLANG_LATVIAN_LATVIA 0x01 +#define SUBLANG_LITHUANIAN 0x01 +#define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01 +#define SUBLANG_MACEDONIAN_MACEDONIA 0x01 +#define SUBLANG_MALAY_MALAYSIA 0x01 +#define SUBLANG_MALAYALAM_INDIA 0x01 +#define SUBLANG_MALTESE_MALTA 0x01 +#define SUBLANG_MAORI_NEW_ZEALAND 0x01 +#define SUBLANG_MAPUDUNGUN_CHILE 0x01 +#define SUBLANG_MARATHI_INDIA 0x01 +#define SUBLANG_MOHAWK_MOHAWK 0x01 +#define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01 +#define SUBLANG_NEPALI_NEPAL 0x01 +#define SUBLANG_NORWEGIAN_BOKMAL 0x01 +#define SUBLANG_OCCITAN_FRANCE 0x01 +#define SUBLANG_ORIYA_INDIA 0x01 +#define SUBLANG_PASHTO_AFGHANISTAN 0x01 +#define SUBLANG_PERSIAN_IRAN 0x01 +#define SUBLANG_POLISH_POLAND 0x01 +#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01 +#define SUBLANG_PUNJABI_INDIA 0x01 +#define SUBLANG_QUECHUA_BOLIVIA 0x01 +#define SUBLANG_ROMANIAN_ROMANIA 0x01 +#define SUBLANG_ROMANSH_SWITZERLAND 0x01 +#define SUBLANG_RUSSIAN_RUSSIA 0x01 +#define SUBLANG_SAMI_NORTHERN_NORWAY 0x01 +#define SUBLANG_SANSKRIT_INDIA 0x01 +#define SUBLANG_SERBIAN_CROATIA 0x01 +#define SUBLANG_SINDHI_INDIA 0x01 +#define SUBLANG_SINHALESE_SRI_LANKA 0x01 +#define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA 0x01 +#define SUBLANG_SLOVAK_SLOVAKIA 0x01 +#define SUBLANG_SLOVENIAN_SLOVENIA 0x01 +#define SUBLANG_SPANISH 0x01 +#define SUBLANG_SWAHILI_KENYA 0x01 +#define SUBLANG_SWEDISH 0x01 +#define SUBLANG_SYRIAC_SYRIA 0x01 +#define SUBLANG_TAJIK_TAJIKISTAN 0x01 +#define SUBLANG_TAMIL_INDIA 0x01 +#define SUBLANG_TATAR_RUSSIA 0x01 +#define SUBLANG_TELUGU_INDIA 0x01 +#define SUBLANG_THAI_THAILAND 0x01 +#define SUBLANG_TIBETAN_PRC 0x01 +#define SUBLANG_TSWANA_SOUTH_AFRICA 0x01 +#define SUBLANG_TURKISH_TURKEY 0x01 +#define SUBLANG_TURKMEN_TURKMENISTAN 0x01 +#define SUBLANG_UIGHUR_PRC 0x01 +#define SUBLANG_UKRAINIAN_UKRAINE 0x01 +#define SUBLANG_UPPER_SORBIAN_GERMANY 0x01 +#define SUBLANG_URDU_PAKISTAN 0x01 +#define SUBLANG_UZBEK_LATIN 0x01 +#define SUBLANG_VIETNAMESE_VIETNAM 0x01 +#define SUBLANG_WELSH_UNITED_KINGDOM 0x01 +#define SUBLANG_WOLOF_SENEGAL 0x01 +#define SUBLANG_XHOSA_SOUTH_AFRICA 0x01 +#define SUBLANG_YAKUT_RUSSIA 0x01 +#define SUBLANG_YI_PRC 0x01 +#define SUBLANG_YORUBA_NIGERIA 0x01 +#define SUBLANG_ZULU_SOUTH_AFRICA 0x01 +#define SORT_INVARIANT_MATH 0x1 +#define SORT_JAPANESE_UNICODE 0x1 +#define SORT_CHINESE_UNICODE 0x1 +#define SORT_KOREAN_UNICODE 0x1 +#define SORT_GERMAN_PHONE_BOOK 0x1 +#define SORT_HUNGARIAN_TECHNICAL 0x1 +#define SORT_GEORGIAN_MODERN 0x1 +#define VS_VERSION_INFO 1 +#define VFFF_ISSHAREDFILE 0x0001 +#define VFF_CURNEDEST 0x0001 +#define VIFF_FORCEINSTALL 0x0001 +#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2 +#define SW_SHOWMINIMIZED 2 +#define SHOW_ICONWINDOW 2 +#define SW_OTHERZOOM 2 +#define VK_RBUTTON 0x02 +#define WM_DESTROY 0x0002 +#define WA_CLICKACTIVE 2 +#define PWR_SUSPENDRESUME 2 +#define NFR_UNICODE 2 +#define UIS_CLEAR 2 +#define UISF_HIDEACCEL 0x2 +#define XBUTTON2 0x0002 +#define WMSZ_RIGHT 2 +#define HTCAPTION 2 +#define SMTO_ABORTIFHUNG 0x0002 +#define MA_ACTIVATEANDEAT 2 +#define ICON_SMALL2 2 +#define SIZE_MAXIMIZED 2 +#define MK_RBUTTON 0x0002 +#define TME_LEAVE 0x00000002 +#define CS_HREDRAW 0x0002 +#define CF_BITMAP 2 +#define IDCANCEL 2 +#define BN_HILITE 2 +#define BST_INDETERMINATE 0x0002 +#define HDS_BUTTONS 0x0002 +#define TBSTYLE_CHECK 0x0002 +#define TTS_NOPREFIX 0x02 +#define TBS_VERT 0x0002 +#define UDS_SETBUDDYINT 0x0002 +#define LWS_IGNORERETURN 0x0002 +#define LVS_SMALLICON 0x0002 +#define TVS_HASLINES 0x0002 +#define TVS_EX_MULTISELECT 0x0002 +#define TCS_BOTTOM 0x0002 +#define TCS_RIGHT 0x0002 +#define ACS_TRANSPARENT 0x0002 +#define MCS_MULTISELECT 0x0002 +#define DTS_SHOWNONE 0x0002 +#define PGS_AUTOSCROLL 0x00000002 +#define NFS_STATIC 0x0002 +#define BCSIF_IMAGE 0x0002 +#define BCSS_STRETCH 0x0002 +#define LANG_BULGARIAN 0x02 +#define SUBLANG_SYS_DEFAULT 0x02 +#define SUBLANG_ARABIC_IRAQ 0x02 +#define SUBLANG_AZERI_CYRILLIC 0x02 +#define SUBLANG_BENGALI_BANGLADESH 0x02 +#define SUBLANG_CHINESE_SIMPLIFIED 0x02 +#define SUBLANG_DUTCH_BELGIAN 0x02 +#define SUBLANG_ENGLISH_UK 0x02 +#define SUBLANG_FRENCH_BELGIAN 0x02 +#define SUBLANG_GERMAN_SWISS 0x02 +#define SUBLANG_INUKTITUT_CANADA_LATIN 0x02 +#define SUBLANG_IRISH_IRELAND 0x02 +#define SUBLANG_ITALIAN_SWISS 0x02 +#define SUBLANG_KASHMIRI_SASIA 0x02 +#define SUBLANG_KASHMIRI_INDIA 0x02 +#define SUBLANG_LOWER_SORBIAN_GERMANY 0x02 +#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 +#define SUBLANG_MONGOLIAN_PRC 0x02 +#define SUBLANG_NEPALI_INDIA 0x02 +#define SUBLANG_NORWEGIAN_NYNORSK 0x02 +#define SUBLANG_PORTUGUESE 0x02 +#define SUBLANG_QUECHUA_ECUADOR 0x02 +#define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02 +#define SUBLANG_SERBIAN_LATIN 0x02 +#define SUBLANG_SINDHI_PAKISTAN 0x02 +#define SUBLANG_SINDHI_AFGHANISTAN 0x02 +#define SUBLANG_SPANISH_MEXICAN 0x02 +#define SUBLANG_SWEDISH_FINLAND 0x02 +#define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02 +#define SUBLANG_TIGRIGNA_ERITREA 0x02 +#define SUBLANG_URDU_INDIA 0x02 +#define SUBLANG_UZBEK_CYRILLIC 0x02 +#define SORT_CHINESE_PRC 0x2 +#define VFF_FILEINUSE 0x0002 +#define VIFF_DONTDELETEOLD 0x0002 +#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3 +#define SW_SHOWMAXIMIZED 3 +#define SW_MAXIMIZE 3 +#define SHOW_FULLSCREEN 3 +#define SW_PARENTOPENING 3 +#define VK_CANCEL 0x03 +#define WM_MOVE 0x0003 +#define PWR_CRITICALRESUME 3 +#define NF_QUERY 3 +#define UIS_INITIALIZE 3 +#define WMSZ_TOP 3 +#define HTSYSMENU 3 +#define MA_NOACTIVATE 3 +#define SIZE_MAXSHOW 3 +#define CF_METAFILEPICT 3 +#define IDABORT 3 +#define BN_UNHILITE 3 +#define LVS_LIST 0x0003 +#define LVS_TYPEMASK 0x0003 +#define LANG_CATALAN 0x03 +#define SUBLANG_CUSTOM_DEFAULT 0x03 +#define SUBLANG_ARABIC_EGYPT 0x03 +#define SUBLANG_CHINESE_HONGKONG 0x03 +#define SUBLANG_ENGLISH_AUS 0x03 +#define SUBLANG_FRENCH_CANADIAN 0x03 +#define SUBLANG_GERMAN_AUSTRIAN 0x03 +#define SUBLANG_QUECHUA_PERU 0x03 +#define SUBLANG_SAMI_NORTHERN_FINLAND 0x03 +#define SUBLANG_SERBIAN_CYRILLIC 0x03 +#define SUBLANG_SPANISH_MODERN 0x03 +#define SORT_CHINESE_BOPOMOFO 0x3 +#define SW_SHOWNOACTIVATE 4 +#define SHOW_OPENNOACTIVATE 4 +#define SW_OTHERUNZOOM 4 +#define VK_MBUTTON 0x04 +#define NF_REQUERY 4 +#define UISF_ACTIVE 0x4 +#define WMSZ_TOPLEFT 4 +#define HTGROWBOX 4 +#define MA_NOACTIVATEANDEAT 4 +#define SIZE_MAXHIDE 4 +#define MK_SHIFT 0x0004 +#define CF_SYLK 4 +#define IDRETRY 4 +#define BN_DISABLE 4 +#define BST_PUSHED 0x0004 +#define HDS_HOTTRACK 0x0004 +#define TBSTYLE_GROUP 0x0004 +#define TBS_TOP 0x0004 +#define TBS_LEFT 0x0004 +#define UDS_ALIGNRIGHT 0x0004 +#define PBS_VERTICAL 0x04 +#define LWS_NOPREFIX 0x0004 +#define LVS_SINGLESEL 0x0004 +#define TVS_LINESATROOT 0x0004 +#define TVS_EX_DOUBLEBUFFER 0x0004 +#define TCS_MULTISELECT 0x0004 +#define ACS_AUTOPLAY 0x0004 +#define MCS_WEEKNUMBERS 0x0004 +#define DTS_LONGDATEFORMAT 0x0004 +#define PGS_DRAGNDROP 0x00000004 +#define NFS_LISTCOMBO 0x0004 +#define BCSIF_STYLE 0x0004 +#define BCSS_ALIGNLEFT 0x0004 +#define LANG_CHINESE 0x04 +#define LANG_CHINESE_SIMPLIFIED 0x04 +#define SUBLANG_CUSTOM_UNSPECIFIED 0x04 +#define SUBLANG_ARABIC_LIBYA 0x04 +#define SUBLANG_CHINESE_SINGAPORE 0x04 +#define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04 +#define SUBLANG_ENGLISH_CAN 0x04 +#define SUBLANG_FRENCH_SWISS 0x04 +#define SUBLANG_GERMAN_LUXEMBOURG 0x04 +#define SUBLANG_SAMI_LULE_NORWAY 0x04 +#define SUBLANG_SPANISH_GUATEMALA 0x04 +#define SORT_JAPANESE_RADICALSTROKE 0x4 +#define VFF_BUFFTOOSMALL 0x0004 +#define SW_SHOW 5 +#define VK_XBUTTON1 0x05 +#define WM_SIZE 0x0005 +#define WMSZ_TOPRIGHT 5 +#define HTMENU 5 +#define CF_DIF 5 +#define IDIGNORE 5 +#define BN_DOUBLECLICKED 5 +#define LANG_CZECH 0x05 +#define SUBLANG_UI_CUSTOM_DEFAULT 0x05 +#define SUBLANG_ARABIC_ALGERIA 0x05 +#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05 +#define SUBLANG_CHINESE_MACAU 0x05 +#define SUBLANG_ENGLISH_NZ 0x05 +#define SUBLANG_FRENCH_LUXEMBOURG 0x05 +#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 +#define SUBLANG_SAMI_LULE_SWEDEN 0x05 +#define SUBLANG_SPANISH_COSTA_RICA 0x05 +#define SW_MINIMIZE 6 +#define VK_XBUTTON2 0x06 +#define WM_ACTIVATE 0x0006 +#define WMSZ_BOTTOM 6 +#define HTHSCROLL 6 +#define CF_TIFF 6 +#define IDYES 6 +#define BN_SETFOCUS 6 +#define LANG_DANISH 0x06 +#define SUBLANG_ARABIC_MOROCCO 0x06 +#define SUBLANG_ENGLISH_EIRE 0x06 +#define SUBLANG_FRENCH_MONACO 0x06 +#define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06 +#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN 0x06 +#define SUBLANG_SPANISH_PANAMA 0x06 +#define SW_SHOWMINNOACTIVE 7 +#define WM_SETFOCUS 0x0007 +#define WMSZ_BOTTOMLEFT 7 +#define HTVSCROLL 7 +#define CF_OEMTEXT 7 +#define IDNO 7 +#define BN_KILLFOCUS 7 +#define LANG_GERMAN 0x07 +#define SUBLANG_ARABIC_TUNISIA 0x07 +#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 +#define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07 +#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x07 +#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 +#define SW_SHOWNA 8 +#define VK_BACK 0x08 +#define WM_KILLFOCUS 0x0008 +#define WMSZ_BOTTOMRIGHT 8 +#define HTMINBUTTON 8 +#define SMTO_NOTIMEOUTIFNOTHUNG 0x0008 +#define MK_CONTROL 0x0008 +#define CS_DBLCLKS 0x0008 +#define CF_DIB 8 +#define IDCLOSE 8 +#define BST_FOCUS 0x0008 +#define HDS_HIDDEN 0x0008 +#define TBSTYLE_DROPDOWN 0x0008 +#define TBS_BOTH 0x0008 +#define UDS_ALIGNLEFT 0x0008 +#define PBS_MARQUEE 0x08 +#define LWS_USEVISUALSTYLE 0x0008 +#define LVS_SHOWSELALWAYS 0x0008 +#define TVS_EDITLABELS 0x0008 +#define TVS_EX_NOINDENTSTATE 0x0008 +#define TCS_FLATBUTTONS 0x0008 +#define ACS_TIMER 0x0008 +#define MCS_NOTODAYCIRCLE 0x0008 +#define NFS_BUTTON 0x0008 +#define BCSIF_SIZE 0x0008 +#define BCSS_IMAGE 0x0008 +#define LANG_GREEK 0x08 +#define SUBLANG_ARABIC_OMAN 0x08 +#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08 +#define SUBLANG_ENGLISH_JAMAICA 0x08 +#define SUBLANG_SAMI_SKOLT_FINLAND 0x08 +#define SUBLANG_SPANISH_VENEZUELA 0x08 +#define SW_RESTORE 9 +#define VK_TAB 0x09 +#define HTMAXBUTTON 9 +#define CF_PALETTE 9 +#define IDHELP 9 +#define DTS_TIMEFORMAT 0x0009 +#define LANG_ENGLISH 0x09 +#define SUBLANG_ARABIC_YEMEN 0x09 +#define SUBLANG_ENGLISH_CARIBBEAN 0x09 +#define SUBLANG_SAMI_INARI_FINLAND 0x09 +#define SUBLANG_SPANISH_COLOMBIA 0x09 +#define SW_SHOWDEFAULT 10 +#define WM_ENABLE 0x000A +#define HTLEFT 10 +#define CF_PENDATA 10 +#define IDTRYAGAIN 10 +#define HELP_CONTEXTMENU 0x000a +#define LANG_SPANISH 0x0a +#define SUBLANG_ARABIC_SYRIA 0x0a +#define SUBLANG_ENGLISH_BELIZE 0x0a +#define SUBLANG_SPANISH_PERU 0x0a +#define SW_FORCEMINIMIZE 11 +#define SW_MAX 11 +#define WM_SETREDRAW 0x000B +#define HTRIGHT 11 +#define CF_RIFF 11 +#define IDCONTINUE 11 +#define HELP_FINDER 0x000b +#define LANG_FINNISH 0x0b +#define SUBLANG_ARABIC_JORDAN 0x0b +#define SUBLANG_ENGLISH_TRINIDAD 0x0b +#define SUBLANG_SPANISH_ARGENTINA 0x0b +#define VK_CLEAR 0x0C +#define WM_SETTEXT 0x000C +#define HTTOP 12 +#define CF_WAVE 12 +#define HELP_WM_HELP 0x000c +#define DTS_SHORTDATECENTURYFORMAT 0x000C +#define LANG_FRENCH 0x0c +#define SUBLANG_ARABIC_LEBANON 0x0c +#define SUBLANG_ENGLISH_ZIMBABWE 0x0c +#define SUBLANG_SPANISH_ECUADOR 0x0c +#define VK_RETURN 0x0D +#define WM_GETTEXT 0x000D +#define HTTOPLEFT 13 +#define CF_UNICODETEXT 13 +#define HELP_SETPOPUP_POS 0x000d +#define LANG_HEBREW 0x0d +#define SUBLANG_ARABIC_KUWAIT 0x0d +#define SUBLANG_ENGLISH_PHILIPPINES 0x0d +#define SUBLANG_SPANISH_CHILE 0x0d +#define WM_GETTEXTLENGTH 0x000E +#define HTTOPRIGHT 14 +#define CF_ENHMETAFILE 14 +#define LANG_HUNGARIAN 0x0e +#define SUBLANG_ARABIC_UAE 0x0e +#define SUBLANG_SPANISH_URUGUAY 0x0e +#define WM_PAINT 0x000F +#define HTBOTTOM 15 +#define CF_HDROP 15 +#define LANG_ICELANDIC 0x0f +#define SUBLANG_ARABIC_BAHRAIN 0x0f +#define SUBLANG_SPANISH_PARAGUAY 0x0f +#define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID 16 +#define VK_SHIFT 0x10 +#define WM_CLOSE 0x0010 +#define HTBOTTOMLEFT 16 +#define WVR_ALIGNTOP 0x0010 +#define MK_MBUTTON 0x0010 +#define TME_NONCLIENT 0x00000010 +#define CF_LOCALE 16 +#define HELP_TCARD_DATA 0x0010 +#define TBSTYLE_AUTOSIZE 0x0010 +#define TTS_NOANIMATE 0x10 +#define TBS_NOTICKS 0x0010 +#define UDS_AUTOBUDDY 0x0010 +#define PBS_SMOOTHREVERSE 0x10 +#define LWS_USECUSTOMTEXT 0x0010 +#define LVS_SORTASCENDING 0x0010 +#define TVS_DISABLEDRAGDROP 0x0010 +#define TVS_EX_RICHTOOLTIP 0x0010 +#define TCS_FORCEICONLEFT 0x0010 +#define MCS_NOTODAY 0x0010 +#define DTS_APPCANPARSE 0x0010 +#define NFS_ALL 0x0010 +#define LANG_ITALIAN 0x10 +#define SUBLANG_ARABIC_QATAR 0x10 +#define SUBLANG_ENGLISH_INDIA 0x10 +#define SUBLANG_SPANISH_BOLIVIA 0x10 +#define VK_CONTROL 0x11 +#define WM_QUERYENDSESSION 0x0011 +#define HTBOTTOMRIGHT 17 +#define CF_DIBV5 17 +#define HELP_TCARD_OTHER_CALLER 0x0011 +#define LANG_JAPANESE 0x11 +#define SUBLANG_ENGLISH_MALAYSIA 0x11 +#define SUBLANG_SPANISH_EL_SALVADOR 0x11 +#define VK_MENU 0x12 +#define WM_QUIT 0x0012 +#define HTBORDER 18 +#define CF_MAX 18 +#define LANG_KOREAN 0x12 +#define SUBLANG_ENGLISH_SINGAPORE 0x12 +#define SUBLANG_SPANISH_HONDURAS 0x12 +#define VK_PAUSE 0x13 +#define WM_QUERYOPEN 0x0013 +#define HTOBJECT 19 +#define LANG_DUTCH 0x13 +#define SUBLANG_SPANISH_NICARAGUA 0x13 +#define VK_CAPITAL 0x14 +#define WM_ERASEBKGND 0x0014 +#define HTCLOSE 20 +#define LANG_NORWEGIAN 0x14 +#define SUBLANG_SPANISH_PUERTO_RICO 0x14 +#define VK_KANA 0x15 +#define VK_HANGEUL 0x15 +#define VK_HANGUL 0x15 +#define WM_SYSCOLORCHANGE 0x0015 +#define HTHELP 21 +#define LANG_POLISH 0x15 +#define SUBLANG_SPANISH_US 0x15 +#define WM_ENDSESSION 0x0016 +#define LANG_PORTUGUESE 0x16 +#define VK_JUNJA 0x17 +#define LANG_ROMANSH 0x17 +#define RT_MANIFEST 24 +#define VK_FINAL 0x18 +#define WM_SHOWWINDOW 0x0018 +#define LANG_ROMANIAN 0x18 +#define VK_HANJA 0x19 +#define VK_KANJI 0x19 +#define LANG_RUSSIAN 0x19 +#define WM_WININICHANGE 0x001A +#define LANG_BOSNIAN 0x1a +#define LANG_CROATIAN 0x1a +#define LANG_SERBIAN 0x1a +#define VK_ESCAPE 0x1B +#define WM_DEVMODECHANGE 0x001B +#define LANG_SLOVAK 0x1b +#define VK_CONVERT 0x1C +#define WM_ACTIVATEAPP 0x001C +#define LANG_ALBANIAN 0x1c +#define VK_NONCONVERT 0x1D +#define WM_FONTCHANGE 0x001D +#define LANG_SWEDISH 0x1d +#define VK_ACCEPT 0x1E +#define WM_TIMECHANGE 0x001E +#define LANG_THAI 0x1e +#define VK_MODECHANGE 0x1F +#define WM_CANCELMODE 0x001F +#define LANG_TURKISH 0x1f +#define VK_SPACE 0x20 +#define WM_SETCURSOR 0x0020 +#define SMTO_ERRORONEXIT 0x0020 +#define WVR_ALIGNLEFT 0x0020 +#define MK_XBUTTON1 0x0020 +#define CS_OWNDC 0x0020 +#define TBSTYLE_NOPREFIX 0x0020 +#define TTS_NOFADE 0x20 +#define TBS_ENABLESELRANGE 0x0020 +#define UDS_ARROWKEYS 0x0020 +#define LWS_RIGHT 0x0020 +#define LVS_SORTDESCENDING 0x0020 +#define TVS_SHOWSELALWAYS 0x0020 +#define TVS_EX_AUTOHSCROLL 0x0020 +#define TCS_FORCELABELLEFT 0x0020 +#define DTS_RIGHTALIGN 0x0020 +#define NFS_USEFONTASSOC 0x0020 +#define LANG_URDU 0x20 +#define VK_PRIOR 0x21 +#define WM_MOUSEACTIVATE 0x0021 +#define LANG_INDONESIAN 0x21 +#define VK_NEXT 0x22 +#define WM_CHILDACTIVATE 0x0022 +#define LANG_UKRAINIAN 0x22 +#define VK_END 0x23 +#define WM_QUEUESYNC 0x0023 +#define LANG_BELARUSIAN 0x23 +#define VK_HOME 0x24 +#define WM_GETMINMAXINFO 0x0024 +#define LANG_SLOVENIAN 0x24 +#define VK_LEFT 0x25 +#define LANG_ESTONIAN 0x25 +#define VK_UP 0x26 +#define WM_PAINTICON 0x0026 +#define LANG_LATVIAN 0x26 +#define VK_RIGHT 0x27 +#define WM_ICONERASEBKGND 0x0027 +#define LANG_LITHUANIAN 0x27 +#define VK_DOWN 0x28 +#define WM_NEXTDLGCTL 0x0028 +#define LANG_TAJIK 0x28 +#define VK_SELECT 0x29 +#define LANG_FARSI 0x29 +#define LANG_PERSIAN 0x29 +#define VK_PRINT 0x2A +#define WM_SPOOLERSTATUS 0x002A +#define LANG_VIETNAMESE 0x2a +#define VK_EXECUTE 0x2B +#define WM_DRAWITEM 0x002B +#define LANG_ARMENIAN 0x2b +#define VK_SNAPSHOT 0x2C +#define WM_MEASUREITEM 0x002C +#define LANG_AZERI 0x2c +#define VK_INSERT 0x2D +#define WM_DELETEITEM 0x002D +#define LANG_BASQUE 0x2d +#define VK_DELETE 0x2E +#define WM_VKEYTOITEM 0x002E +#define LANG_LOWER_SORBIAN 0x2e +#define LANG_UPPER_SORBIAN 0x2e +#define VK_HELP 0x2F +#define WM_CHARTOITEM 0x002F +#define LANG_MACEDONIAN 0x2f +#define WM_SETFONT 0x0030 +#define WM_GETFONT 0x0031 +#define WM_SETHOTKEY 0x0032 +#define LANG_TSWANA 0x32 +#define WM_GETHOTKEY 0x0033 +#define LANG_XHOSA 0x34 +#define LANG_ZULU 0x35 +#define LANG_AFRIKAANS 0x36 +#define WM_QUERYDRAGICON 0x0037 +#define LANG_GEORGIAN 0x37 +#define LANG_FAEROESE 0x38 +#define WM_COMPAREITEM 0x0039 +#define LANG_HINDI 0x39 +#define LANG_MALTESE 0x3a +#define LANG_SAMI 0x3b +#define LANG_IRISH 0x3c +#define WM_GETOBJECT 0x003D +#define LANG_MALAY 0x3e +#define LANG_KAZAK 0x3f +#define WVR_ALIGNBOTTOM 0x0040 +#define MK_XBUTTON2 0x0040 +#define CS_CLASSDC 0x0040 +#define HDS_DRAGDROP 0x0040 +#define BTNS_SHOWTEXT 0x0040 +#define TTS_BALLOON 0x40 +#define TBS_FIXEDLENGTH 0x0040 +#define UDS_HORZ 0x0040 +#define LVS_SHAREIMAGELISTS 0x0040 +#define TVS_RTLREADING 0x0040 +#define TVS_EX_FADEINOUTEXPANDOS 0x0040 +#define TCS_HOTTRACK 0x0040 +#define MCS_NOTRAILINGDATES 0x0040 +#define LANG_KYRGYZ 0x40 +#define WM_COMPACTING 0x0041 +#define LANG_SWAHILI 0x41 +#define LANG_TURKMEN 0x42 +#define LANG_UZBEK 0x43 +#define WM_COMMNOTIFY 0x0044 +#define LANG_TATAR 0x44 +#define LANG_BENGALI 0x45 +#define WM_WINDOWPOSCHANGING 0x0046 +#define LANG_PUNJABI 0x46 +#define WM_WINDOWPOSCHANGED 0x0047 +#define LANG_GUJARATI 0x47 +#define WM_POWER 0x0048 +#define LANG_ORIYA 0x48 +#define LANG_TAMIL 0x49 +#define WM_COPYDATA 0x004A +#define LANG_TELUGU 0x4a +#define WM_CANCELJOURNAL 0x004B +#define LANG_KANNADA 0x4b +#define LANG_MALAYALAM 0x4c +#define LANG_ASSAMESE 0x4d +#define WM_NOTIFY 0x004E +#define LANG_MARATHI 0x4e +#define LANG_SANSKRIT 0x4f +#define WM_INPUTLANGCHANGEREQUEST 0x0050 +#define LANG_MONGOLIAN 0x50 +#define WM_INPUTLANGCHANGE 0x0051 +#define LANG_TIBETAN 0x51 +#define WM_TCARD 0x0052 +#define LANG_WELSH 0x52 +#define WM_HELP 0x0053 +#define LANG_KHMER 0x53 +#define WM_USERCHANGED 0x0054 +#define LANG_LAO 0x54 +#define WM_NOTIFYFORMAT 0x0055 +#define LANG_GALICIAN 0x56 +#define LANG_KONKANI 0x57 +#define LANG_MANIPURI 0x58 +#define LANG_SINDHI 0x59 +#define LANG_SYRIAC 0x5a +#define VK_LWIN 0x5B +#define LANG_SINHALESE 0x5b +#define VK_RWIN 0x5C +#define VK_APPS 0x5D +#define LANG_INUKTITUT 0x5d +#define LANG_AMHARIC 0x5e +#define VK_SLEEP 0x5F +#define LANG_TAMAZIGHT 0x5f +#define VK_NUMPAD0 0x60 +#define LANG_KASHMIRI 0x60 +#define VK_NUMPAD1 0x61 +#define LANG_NEPALI 0x61 +#define VK_NUMPAD2 0x62 +#define LANG_FRISIAN 0x62 +#define VK_NUMPAD3 0x63 +#define LANG_PASHTO 0x63 +#define VK_NUMPAD4 0x64 +#define LANG_FILIPINO 0x64 +#define VS_USER_DEFINED 100 #define IDD_ABOUT 101 +#define VK_NUMPAD5 0x65 +#define LANG_DIVEHI 0x65 #define IDD_SETTINGS 102 +#define VK_NUMPAD6 0x66 #define IDD_DEBUGGER 103 +#define VK_NUMPAD7 0x67 #define IDD_ADVANCED 104 +#define VK_NUMPAD8 0x68 +#define LANG_HAUSA 0x68 #define IDD_ENHANCEMENTS 105 +#define VK_NUMPAD9 0x69 +#define VK_MULTIPLY 0x6A +#define LANG_YORUBA 0x6a +#define VK_ADD 0x6B +#define LANG_QUECHUA 0x6b +#define VK_SEPARATOR 0x6C +#define LANG_SOTHO 0x6c +#define VK_SUBTRACT 0x6D +#define LANG_BASHKIR 0x6d +#define VK_DECIMAL 0x6E +#define LANG_LUXEMBOURGISH 0x6e +#define VK_DIVIDE 0x6F +#define LANG_GREENLANDIC 0x6f +#define VK_F1 0x70 +#define LANG_IGBO 0x70 +#define VK_F2 0x71 +#define VK_F3 0x72 +#define VK_F4 0x73 +#define LANG_TIGRIGNA 0x73 +#define VK_F5 0x74 +#define VK_F6 0x75 +#define VK_F7 0x76 +#define VK_F8 0x77 +#define VK_F9 0x78 +#define WHEEL_DELTA 120 +#define LANG_YI 0x78 +#define VK_F10 0x79 +#define VK_F11 0x7A +#define LANG_MAPUDUNGUN 0x7a +#define VK_F12 0x7B +#define WM_CONTEXTMENU 0x007B +#define VK_F13 0x7C +#define WM_STYLECHANGING 0x007C +#define LANG_MOHAWK 0x7c +#define VK_F14 0x7D +#define WM_STYLECHANGED 0x007D +#define VK_F15 0x7E +#define WM_DISPLAYCHANGE 0x007E +#define LANG_BRETON 0x7e +#define VK_F16 0x7F +#define WM_GETICON 0x007F +#define LANG_INVARIANT 0x7f +#define VK_F17 0x80 +#define WM_SETICON 0x0080 +#define WVR_ALIGNRIGHT 0x0080 +#define CS_PARENTDC 0x0080 +#define CF_OWNERDISPLAY 0x0080 +#define HDS_FULLDRAG 0x0080 +#define BTNS_WHOLEDROPDOWN 0x0080 +#define TTS_CLOSE 0x80 +#define TBS_NOTHUMB 0x0080 +#define UDS_NOTHOUSANDS 0x0080 +#define LVS_NOLABELWRAP 0x0080 +#define TVS_NOTOOLTIPS 0x0080 +#define TVS_EX_PARTIALCHECKBOXES 0x0080 +#define TCS_VERTICAL 0x0080 +#define MCS_SHORTDAYSOFWEEK 0x0080 +#define LANG_UIGHUR 0x80 +#define VK_F18 0x81 +#define WM_NCCREATE 0x0081 +#define CF_DSPTEXT 0x0081 +#define LANG_MAORI 0x81 +#define VK_F19 0x82 +#define WM_NCDESTROY 0x0082 +#define CF_DSPBITMAP 0x0082 +#define LANG_OCCITAN 0x82 +#define VK_F20 0x83 +#define WM_NCCALCSIZE 0x0083 +#define CF_DSPMETAFILEPICT 0x0083 +#define LANG_CORSICAN 0x83 +#define VK_F21 0x84 +#define WM_NCHITTEST 0x0084 +#define LANG_ALSATIAN 0x84 +#define VK_F22 0x85 +#define WM_NCPAINT 0x0085 +#define LANG_YAKUT 0x85 +#define VK_F23 0x86 +#define WM_NCACTIVATE 0x0086 +#define LANG_KICHE 0x86 +#define VK_F24 0x87 +#define WM_GETDLGCODE 0x0087 +#define LANG_KINYARWANDA 0x87 +#define WM_SYNCPAINT 0x0088 +#define LANG_WOLOF 0x88 +#define LANG_DARI 0x8c +#define CF_DSPENHMETAFILE 0x008E +#define VK_NUMLOCK 0x90 +#define VK_SCROLL 0x91 +#define VK_OEM_NEC_EQUAL 0x92 +#define VK_OEM_FJ_JISHO 0x92 +#define VK_OEM_FJ_MASSHOU 0x93 +#define VK_OEM_FJ_TOUROKU 0x94 +#define VK_OEM_FJ_LOYA 0x95 +#define VK_OEM_FJ_ROYA 0x96 +#define VK_LSHIFT 0xA0 +#define WM_NCMOUSEMOVE 0x00A0 +#define VK_RSHIFT 0xA1 +#define WM_NCLBUTTONDOWN 0x00A1 +#define VK_LCONTROL 0xA2 +#define WM_NCLBUTTONUP 0x00A2 +#define VK_RCONTROL 0xA3 +#define WM_NCLBUTTONDBLCLK 0x00A3 +#define VK_LMENU 0xA4 +#define WM_NCRBUTTONDOWN 0x00A4 +#define VK_RMENU 0xA5 +#define WM_NCRBUTTONUP 0x00A5 +#define VK_BROWSER_BACK 0xA6 +#define WM_NCRBUTTONDBLCLK 0x00A6 +#define VK_BROWSER_FORWARD 0xA7 +#define WM_NCMBUTTONDOWN 0x00A7 +#define VK_BROWSER_REFRESH 0xA8 +#define WM_NCMBUTTONUP 0x00A8 +#define VK_BROWSER_STOP 0xA9 +#define WM_NCMBUTTONDBLCLK 0x00A9 +#define VK_BROWSER_SEARCH 0xAA +#define VK_BROWSER_FAVORITES 0xAB +#define WM_NCXBUTTONDOWN 0x00AB +#define VK_BROWSER_HOME 0xAC +#define WM_NCXBUTTONUP 0x00AC +#define VK_VOLUME_MUTE 0xAD +#define WM_NCXBUTTONDBLCLK 0x00AD +#define VK_VOLUME_DOWN 0xAE +#define VK_VOLUME_UP 0xAF +#define VK_MEDIA_NEXT_TRACK 0xB0 +#define EM_GETSEL 0x00B0 +#define VK_MEDIA_PREV_TRACK 0xB1 +#define EM_SETSEL 0x00B1 +#define VK_MEDIA_STOP 0xB2 +#define EM_GETRECT 0x00B2 +#define VK_MEDIA_PLAY_PAUSE 0xB3 +#define EM_SETRECT 0x00B3 +#define VK_LAUNCH_MAIL 0xB4 +#define EM_SETRECTNP 0x00B4 +#define VK_LAUNCH_MEDIA_SELECT 0xB5 +#define EM_SCROLL 0x00B5 +#define VK_LAUNCH_APP1 0xB6 +#define EM_LINESCROLL 0x00B6 +#define VK_LAUNCH_APP2 0xB7 +#define EM_SCROLLCARET 0x00B7 +#define EM_GETMODIFY 0x00B8 +#define EM_SETMODIFY 0x00B9 +#define VK_OEM_1 0xBA +#define EM_GETLINECOUNT 0x00BA +#define VK_OEM_PLUS 0xBB +#define EM_LINEINDEX 0x00BB +#define VK_OEM_COMMA 0xBC +#define EM_SETHANDLE 0x00BC +#define VK_OEM_MINUS 0xBD +#define EM_GETHANDLE 0x00BD +#define VK_OEM_PERIOD 0xBE +#define EM_GETTHUMB 0x00BE +#define VK_OEM_2 0xBF +#define VK_OEM_3 0xC0 +#define EM_LINELENGTH 0x00C1 +#define EM_REPLACESEL 0x00C2 +#define EM_GETLINE 0x00C4 +#define EM_LIMITTEXT 0x00C5 +#define EM_CANUNDO 0x00C6 +#define EM_UNDO 0x00C7 +#define EM_FMTLINES 0x00C8 +#define EM_LINEFROMCHAR 0x00C9 +#define EM_SETTABSTOPS 0x00CB +#define EM_SETPASSWORDCHAR 0x00CC +#define EM_EMPTYUNDOBUFFER 0x00CD +#define EM_GETFIRSTVISIBLELINE 0x00CE +#define EM_SETREADONLY 0x00CF +#define EM_SETWORDBREAKPROC 0x00D0 +#define EM_GETWORDBREAKPROC 0x00D1 +#define EM_GETPASSWORDCHAR 0x00D2 +#define EM_SETMARGINS 0x00D3 +#define EM_GETMARGINS 0x00D4 +#define EM_GETLIMITTEXT 0x00D5 +#define EM_POSFROMCHAR 0x00D6 +#define EM_CHARFROMPOS 0x00D7 +#define EM_SETIMESTATUS 0x00D8 +#define EM_GETIMESTATUS 0x00D9 +#define VK_OEM_4 0xDB +#define VK_OEM_5 0xDC +#define VK_OEM_6 0xDD +#define VK_OEM_7 0xDE +#define VK_OEM_8 0xDF +#define VK_OEM_AX 0xE1 +#define VK_OEM_102 0xE2 +#define VK_ICO_HELP 0xE3 +#define VK_ICO_00 0xE4 +#define VK_PROCESSKEY 0xE5 +#define VK_ICO_CLEAR 0xE6 +#define VK_PACKET 0xE7 +#define VK_OEM_RESET 0xE9 +#define VK_OEM_JUMP 0xEA +#define VK_OEM_PA1 0xEB +#define VK_OEM_PA2 0xEC +#define VK_OEM_PA3 0xED +#define VK_OEM_WSCTRL 0xEE +#define VK_OEM_CUSEL 0xEF +#define VK_OEM_ATTN 0xF0 +#define BM_GETCHECK 0x00F0 +#define VK_OEM_FINISH 0xF1 +#define BM_SETCHECK 0x00F1 +#define VK_OEM_COPY 0xF2 +#define BM_GETSTATE 0x00F2 +#define VK_OEM_AUTO 0xF3 +#define BM_SETSTATE 0x00F3 +#define VK_OEM_ENLW 0xF4 +#define BM_SETSTYLE 0x00F4 +#define VK_OEM_BACKTAB 0xF5 +#define BM_CLICK 0x00F5 +#define VK_ATTN 0xF6 +#define BM_GETIMAGE 0x00F6 +#define VK_CRSEL 0xF7 +#define BM_SETIMAGE 0x00F7 +#define VK_EXSEL 0xF8 +#define BM_SETDONTCLICK 0x00F8 +#define VK_EREOF 0xF9 +#define VK_PLAY 0xFA +#define VK_ZOOM 0xFB +#define VK_NONAME 0xFC +#define VK_PA1 0xFD +#define VK_OEM_CLEAR 0xFE +#define WM_INPUT_DEVICE_CHANGE 0x00FE +#define SUBVERSION_MASK 0x000000FF +#define WM_INPUT 0x00FF +#define WM_KEYFIRST 0x0100 +#define WM_KEYDOWN 0x0100 +#define WVR_HREDRAW 0x0100 +#define HDS_FILTERBAR 0x0100 +#define TBSTYLE_TOOLTIPS 0x0100 +#define RBS_TOOLTIPS 0x00000100 +#define TTS_USEVISUALSTYLE 0x100 +#define SBARS_SIZEGRIP 0x0100 +#define TBS_TOOLTIPS 0x0100 +#define UDS_HOTTRACK 0x0100 +#define LVS_AUTOARRANGE 0x0100 +#define TVS_CHECKBOXES 0x0100 +#define TVS_EX_EXCLUSIONCHECKBOXES 0x0100 +#define TCS_BUTTONS 0x0100 +#define MCS_NOSELCHANGEONNAV 0x0100 +#define WM_KEYUP 0x0101 +#define WM_CHAR 0x0102 +#define WM_DEADCHAR 0x0103 +#define WM_SYSKEYDOWN 0x0104 +#define WM_SYSKEYUP 0x0105 +#define WM_SYSCHAR 0x0106 +#define WM_SYSDEADCHAR 0x0107 +#define WM_UNICHAR 0x0109 +#define WM_KEYLAST 0x0109 +#define WM_IME_STARTCOMPOSITION 0x010D +#define WM_IME_ENDCOMPOSITION 0x010E +#define WM_IME_COMPOSITION 0x010F +#define WM_IME_KEYLAST 0x010F +#define WM_INITDIALOG 0x0110 +#define WM_COMMAND 0x0111 +#define WM_SYSCOMMAND 0x0112 +#define WM_TIMER 0x0113 +#define WM_HSCROLL 0x0114 +#define WM_VSCROLL 0x0115 +#define WM_INITMENU 0x0116 +#define WM_INITMENUPOPUP 0x0117 +#define WM_MENUSELECT 0x011F +#define WM_MENUCHAR 0x0120 +#define WM_ENTERIDLE 0x0121 +#define WM_MENURBUTTONUP 0x0122 +#define WM_MENUDRAG 0x0123 +#define WM_MENUGETOBJECT 0x0124 +#define WM_UNINITMENUPOPUP 0x0125 +#define WM_MENUCOMMAND 0x0126 +#define WM_CHANGEUISTATE 0x0127 +#define WM_UPDATEUISTATE 0x0128 +#define WM_QUERYUISTATE 0x0129 +#define WM_CTLCOLORMSGBOX 0x0132 +#define WM_CTLCOLOREDIT 0x0133 +#define WM_CTLCOLORLISTBOX 0x0134 +#define WM_CTLCOLORBTN 0x0135 +#define WM_CTLCOLORDLG 0x0136 +#define WM_CTLCOLORSCROLLBAR 0x0137 +#define WM_CTLCOLORSTATIC 0x0138 +#define MN_GETHMENU 0x01E1 +#define _WIN32_IE_IE20 0x0200 +#define WM_MOUSEFIRST 0x0200 +#define WM_MOUSEMOVE 0x0200 +#define WVR_VREDRAW 0x0200 +#define CS_NOCLOSE 0x0200 +#define CF_PRIVATEFIRST 0x0200 +#define HDS_FLAT 0x0200 +#define TBSTYLE_WRAPABLE 0x0200 +#define RBS_VARHEIGHT 0x00000200 +#define TBS_REVERSED 0x0200 +#define LVS_EDITLABELS 0x0200 +#define TVS_TRACKSELECT 0x0200 +#define TVS_EX_DIMMEDCHECKBOXES 0x0200 +#define TCS_MULTILINE 0x0200 +#define WM_LBUTTONDOWN 0x0201 +#define WM_LBUTTONUP 0x0202 +#define WM_LBUTTONDBLCLK 0x0203 +#define WM_RBUTTONDOWN 0x0204 +#define WM_RBUTTONUP 0x0205 +#define WM_RBUTTONDBLCLK 0x0206 +#define WM_MBUTTONDOWN 0x0207 +#define WM_MBUTTONUP 0x0208 +#define WM_MBUTTONDBLCLK 0x0209 +#define WM_MOUSEWHEEL 0x020A +#define WM_XBUTTONDOWN 0x020B +#define WM_XBUTTONUP 0x020C +#define WM_XBUTTONDBLCLK 0x020D +#define WM_MOUSEHWHEEL 0x020E +#define WM_MOUSELAST 0x020E +#define WM_PARENTNOTIFY 0x0210 +#define WM_ENTERMENULOOP 0x0211 +#define WM_EXITMENULOOP 0x0212 +#define WM_NEXTMENU 0x0213 +#define WM_SIZING 0x0214 +#define WM_CAPTURECHANGED 0x0215 +#define WM_MOVING 0x0216 +#define WM_POWERBROADCAST 0x0218 +#define WM_DEVICECHANGE 0x0219 +#define WM_MDICREATE 0x0220 +#define WM_MDIDESTROY 0x0221 +#define WM_MDIACTIVATE 0x0222 +#define WM_MDIRESTORE 0x0223 +#define WM_MDINEXT 0x0224 +#define WM_MDIMAXIMIZE 0x0225 +#define WM_MDITILE 0x0226 +#define WM_MDICASCADE 0x0227 +#define WM_MDIICONARRANGE 0x0228 +#define WM_MDIGETACTIVE 0x0229 +#define WM_MDISETMENU 0x0230 +#define WM_ENTERSIZEMOVE 0x0231 +#define WM_EXITSIZEMOVE 0x0232 +#define WM_DROPFILES 0x0233 +#define WM_MDIREFRESHMENU 0x0234 +#define WM_IME_SETCONTEXT 0x0281 +#define WM_IME_NOTIFY 0x0282 +#define WM_IME_CONTROL 0x0283 +#define WM_IME_COMPOSITIONFULL 0x0284 +#define WM_IME_SELECT 0x0285 +#define WM_IME_CHAR 0x0286 +#define WM_IME_REQUEST 0x0288 +#define WM_IME_KEYDOWN 0x0290 +#define WM_IME_KEYUP 0x0291 +#define WM_NCMOUSEHOVER 0x02A0 +#define WM_MOUSEHOVER 0x02A1 +#define WM_NCMOUSELEAVE 0x02A2 +#define WM_MOUSELEAVE 0x02A3 +#define WM_WTSSESSION_CHANGE 0x02B1 +#define WM_TABLET_FIRST 0x02c0 +#define WM_TABLET_LAST 0x02df +#define CF_PRIVATELAST 0x02FF +#define _WIN32_IE_IE30 0x0300 +#define WM_CUT 0x0300 +#define CF_GDIOBJFIRST 0x0300 +#define WM_COPY 0x0301 +#define _WIN32_IE_IE302 0x0302 +#define WM_PASTE 0x0302 +#define WM_CLEAR 0x0303 +#define WM_UNDO 0x0304 +#define WM_RENDERFORMAT 0x0305 +#define WM_RENDERALLFORMATS 0x0306 +#define WM_DESTROYCLIPBOARD 0x0307 +#define WM_DRAWCLIPBOARD 0x0308 +#define WM_PAINTCLIPBOARD 0x0309 +#define WM_VSCROLLCLIPBOARD 0x030A +#define WM_SIZECLIPBOARD 0x030B +#define WM_ASKCBFORMATNAME 0x030C +#define WM_CHANGECBCHAIN 0x030D +#define WM_HSCROLLCLIPBOARD 0x030E +#define WM_QUERYNEWPALETTE 0x030F +#define WM_PALETTEISCHANGING 0x0310 +#define WM_PALETTECHANGED 0x0311 +#define WM_HOTKEY 0x0312 +#define WM_PRINT 0x0317 +#define WM_PRINTCLIENT 0x0318 +#define WM_APPCOMMAND 0x0319 +#define WM_THEMECHANGED 0x031A +#define WM_CLIPBOARDUPDATE 0x031D +#define WM_DWMCOMPOSITIONCHANGED 0x031E +#define WM_DWMNCRENDERINGCHANGED 0x031F +#define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320 +#define WM_DWMWINDOWMAXIMIZEDCHANGE 0x0321 +#define WM_GETTITLEBARINFOEX 0x033F +#define WM_HANDHELDFIRST 0x0358 +#define WM_HANDHELDLAST 0x035F +#define WM_AFXFIRST 0x0360 +#define WM_AFXLAST 0x037F +#define WM_PENWINFIRST 0x0380 +#define WM_PENWINLAST 0x038F +#define WM_DDE_FIRST 0x03E0 #define IDC_ENABLETEXTURING 1001 #define IDC_CHECK2 1002 #define IDC_WIREFRAME 1002 @@ -44,20 +1177,364 @@ #define IDC_ANIMATE1 1021 #define IDC_OVERLAYSTATS 1022 #define IDC_DLOPTLEVEL 1023 +#define CF_GDIOBJLAST 0x03FF #define IDC_PREUPSCALETYPE 1024 +#define _WIN32_WINNT_NT4 0x0400 +#define _WIN32_IE_IE40 0x0400 +#define WM_USER 0x0400 +#define WVR_VALIDRECTS 0x0400 +#define HDS_CHECKBOXES 0x0400 +#define TBSTYLE_ALTDRAG 0x0400 +#define RBS_BANDBORDERS 0x00000400 +#define TBS_DOWNISLEFT 0x0400 +#define LVS_OWNERDRAWFIXED 0x0400 +#define TVS_SINGLEEXPAND 0x0400 +#define TVS_EX_DRAWIMAGEASYNC 0x0400 +#define TCS_FIXEDWIDTH 0x0400 +#define ctlFirst 0x0400 +#define psh1 0x0400 #define IDC_TRUFORMLEVEL 1025 +#define _WIN32_IE_IE401 0x0401 +#define psh2 0x0401 #define IDC_PREUPSCALE 1026 +#define psh3 0x0402 #define IDC_SLIDER1 1027 +#define psh4 0x0403 #define IDC_TEXDUMPPATH 1028 +#define psh5 0x0404 #define IDC_TEXDUMP 1029 +#define psh6 0x0405 #define IDC_FORCEFILTERING 1030 +#define psh7 0x0406 #define IDC_BROWSETEXDUMPPATH 1031 +#define psh8 0x0407 +#define psh9 0x0408 #define IDC_SHOWSHADERERRORS 1033 +#define psh10 0x0409 #define IDC_CHECK3 1034 #define IDC_TEXFMT_CENTER 1034 +#define psh11 0x040a +#define IDC_ASPECT_4_3 1034 #define IDC_TEXFMT_OVERLAY 1035 +#define psh12 0x040b +#define IDC_ASPECT_16_9 1035 #define IDC_OVERLAYPROJSTATS 1036 +#define psh13 0x040c +#define IDC_CHECK4 1036 +#define IDC_WIDESCREEN_HACK 1036 #define IDC_DUMPFRAMES 1037 +#define psh14 0x040d +#define psh15 0x040e +#define psh16 0x040f +#define _WIN32_WINDOWS 0x0410 +#define chx1 0x0410 +#define chx2 0x0411 +#define chx3 0x0412 +#define chx4 0x0413 +#define chx5 0x0414 +#define chx6 0x0415 +#define chx7 0x0416 +#define chx8 0x0417 +#define chx9 0x0418 +#define chx10 0x0419 +#define chx11 0x041a +#define chx12 0x041b +#define chx13 0x041c +#define chx14 0x041d +#define chx15 0x041e +#define chx16 0x041f +#define rad1 0x0420 +#define rad2 0x0421 +#define rad3 0x0422 +#define rad4 0x0423 +#define rad5 0x0424 +#define rad6 0x0425 +#define rad7 0x0426 +#define rad8 0x0427 +#define rad9 0x0428 +#define rad10 0x0429 +#define rad11 0x042a +#define rad12 0x042b +#define rad13 0x042c +#define rad14 0x042d +#define rad15 0x042e +#define rad16 0x042f +#define grp1 0x0430 +#define grp2 0x0431 +#define grp3 0x0432 +#define grp4 0x0433 +#define frm1 0x0434 +#define frm2 0x0435 +#define frm3 0x0436 +#define frm4 0x0437 +#define rct1 0x0438 +#define rct2 0x0439 +#define rct3 0x043a +#define rct4 0x043b +#define ico1 0x043c +#define ico2 0x043d +#define ico3 0x043e +#define ico4 0x043f +#define stc1 0x0440 +#define stc2 0x0441 +#define stc3 0x0442 +#define stc4 0x0443 +#define stc5 0x0444 +#define stc6 0x0445 +#define stc7 0x0446 +#define stc8 0x0447 +#define stc9 0x0448 +#define stc10 0x0449 +#define stc11 0x044a +#define stc12 0x044b +#define stc13 0x044c +#define stc14 0x044d +#define stc15 0x044e +#define stc16 0x044f +#define stc17 0x0450 +#define stc18 0x0451 +#define stc19 0x0452 +#define stc20 0x0453 +#define stc21 0x0454 +#define stc22 0x0455 +#define stc23 0x0456 +#define stc24 0x0457 +#define stc25 0x0458 +#define stc26 0x0459 +#define stc27 0x045a +#define stc28 0x045b +#define stc29 0x045c +#define stc30 0x045d +#define stc31 0x045e +#define stc32 0x045f +#define lst1 0x0460 +#define lst2 0x0461 +#define lst3 0x0462 +#define lst4 0x0463 +#define lst5 0x0464 +#define lst6 0x0465 +#define lst7 0x0466 +#define lst8 0x0467 +#define lst9 0x0468 +#define lst10 0x0469 +#define lst11 0x046a +#define lst12 0x046b +#define lst13 0x046c +#define lst14 0x046d +#define lst15 0x046e +#define lst16 0x046f +#define cmb1 0x0470 +#define cmb2 0x0471 +#define cmb3 0x0472 +#define cmb4 0x0473 +#define cmb5 0x0474 +#define cmb6 0x0475 +#define cmb7 0x0476 +#define cmb8 0x0477 +#define cmb9 0x0478 +#define cmb10 0x0479 +#define cmb11 0x047a +#define cmb12 0x047b +#define cmb13 0x047c +#define cmb14 0x047d +#define cmb15 0x047e +#define cmb16 0x047f +#define edt1 0x0480 +#define edt2 0x0481 +#define edt3 0x0482 +#define edt4 0x0483 +#define edt5 0x0484 +#define edt6 0x0485 +#define edt7 0x0486 +#define edt8 0x0487 +#define edt9 0x0488 +#define edt10 0x0489 +#define edt11 0x048a +#define edt12 0x048b +#define edt13 0x048c +#define edt14 0x048d +#define edt15 0x048e +#define edt16 0x048f +#define scr1 0x0490 +#define scr2 0x0491 +#define scr3 0x0492 +#define scr4 0x0493 +#define scr5 0x0494 +#define scr6 0x0495 +#define scr7 0x0496 +#define scr8 0x0497 +#define ctl1 0x04A0 +#define ctlLast 0x04ff +#define _WIN32_WINNT_WIN2K 0x0500 +#define _WIN32_IE_IE50 0x0500 +#define _WIN32_WINNT_WINXP 0x0501 +#define _WIN32_IE_IE501 0x0501 +#define _WIN32_WINNT_WS03 0x0502 +#define _WIN32_IE_IE55 0x0550 +#define _WIN32_WINNT_LONGHORN 0x0600 +#define _WIN32_IE_IE60 0x0600 +#define _WIN32_WINNT 0x0600 +#define FILEOPENORD 1536 +#define _WIN32_IE_IE60SP1 0x0601 +#define MULTIFILEOPENORD 1537 +#define _WIN32_IE_WS03 0x0602 +#define PRINTDLGORD 1538 +#define _WIN32_IE_IE60SP2 0x0603 +#define PRNSETUPDLGORD 1539 +#define FINDDLGORD 1540 +#define REPLACEDLGORD 1541 +#define FONTDLGORD 1542 +#define FORMATDLGORD31 1543 +#define FORMATDLGORD30 1544 +#define RUNDLGORD 1545 +#define PAGESETUPDLGORD 1546 +#define NEWFILEOPENORD 1547 +#define PRINTDLGEXORD 1549 +#define PAGESETUPDLGORDMOTIF 1550 +#define COLORMGMTDLGORD 1551 +#define NEWFILEOPENV2ORD 1552 +#define NEWFILEOPENV3ORD 1553 +#define _WIN32_IE_IE70 0x0700 +#define _WIN32_IE 0x0700 +#define CS_SAVEBITS 0x0800 +#define HDS_NOSIZING 0x0800 +#define TBSTYLE_FLAT 0x0800 +#define RBS_FIXEDORDER 0x00000800 +#define SBARS_TOOLTIPS 0x0800 +#define SBT_TOOLTIPS 0x0800 +#define TBS_NOTIFYBEFOREMOVE 0x0800 +#define LVS_ALIGNLEFT 0x0800 +#define TVS_INFOTIP 0x0800 +#define TCS_RAGGEDRIGHT 0x0800 +#define LVS_ALIGNMASK 0x0c00 +#define CS_BYTEALIGNCLIENT 0x1000 +#define HDS_OVERFLOW 0x1000 +#define TBSTYLE_LIST 0x1000 +#define RBS_REGISTERDROP 0x00001000 +#define TBS_TRANSPARENTBKGND 0x1000 +#define LVS_OWNERDATA 0x1000 +#define TVS_FULLROWSELECT 0x1000 +#define TCS_FOCUSONBUTTONDOWN 0x1000 +#define CS_BYTEALIGNWINDOW 0x2000 +#define TBSTYLE_CUSTOMERASE 0x2000 +#define RBS_AUTOSIZE 0x00002000 +#define LVS_NOSCROLL 0x2000 +#define TVS_NOSCROLL 0x2000 +#define TCS_OWNERDRAWFIXED 0x2000 +#define CS_GLOBALCLASS 0x4000 +#define TBSTYLE_REGISTERDROP 0x4000 +#define RBS_VERTICALGRIPPER 0x00004000 +#define LVS_NOCOLUMNHEADER 0x4000 +#define TVS_NONEVENHEIGHT 0x4000 +#define TCS_TOOLTIPS 0x4000 +#define IDH_NO_HELP 28440 +#define IDH_MISSING_CONTEXT 28441 +#define IDH_GENERIC_HELP_BUTTON 28442 +#define IDH_OK 28443 +#define IDH_CANCEL 28444 +#define IDH_HELP 28445 +#define LANG_BOSNIAN_NEUTRAL 0x781a +#define LANG_CHINESE_TRADITIONAL 0x7c04 +#define LANG_SERBIAN_NEUTRAL 0x7c1a +#define IDTIMEOUT 32000 +#define OCR_NORMAL 32512 +#define OIC_SAMPLE 32512 +#define IDI_APPLICATION 32512 +#define OCR_IBEAM 32513 +#define OIC_HAND 32513 +#define IDI_HAND 32513 +#define OCR_WAIT 32514 +#define OIC_QUES 32514 +#define IDI_QUESTION 32514 +#define OCR_CROSS 32515 +#define OIC_BANG 32515 +#define IDI_EXCLAMATION 32515 +#define OCR_UP 32516 +#define OIC_NOTE 32516 +#define IDI_ASTERISK 32516 +#define OIC_WINLOGO 32517 +#define IDI_WINLOGO 32517 +#define OIC_SHIELD 32518 +#define IDI_SHIELD 32518 +#define OCR_SIZE 32640 +#define OCR_ICON 32641 +#define OCR_SIZENWSE 32642 +#define OCR_SIZENESW 32643 +#define OCR_SIZEWE 32644 +#define OCR_SIZENS 32645 +#define OCR_SIZEALL 32646 +#define OCR_ICOCUR 32647 +#define OCR_NO 32648 +#define OCR_HAND 32649 +#define OCR_APPSTARTING 32650 +#define OBM_LFARROWI 32734 +#define OBM_RGARROWI 32735 +#define OBM_DNARROWI 32736 +#define OBM_UPARROWI 32737 +#define OBM_COMBO 32738 +#define OBM_MNARROW 32739 +#define OBM_LFARROWD 32740 +#define OBM_RGARROWD 32741 +#define OBM_DNARROWD 32742 +#define OBM_UPARROWD 32743 +#define OBM_RESTORED 32744 +#define OBM_ZOOMD 32745 +#define OBM_REDUCED 32746 +#define OBM_RESTORE 32747 +#define OBM_ZOOM 32748 +#define OBM_REDUCE 32749 +#define OBM_LFARROW 32750 +#define OBM_RGARROW 32751 +#define OBM_DNARROW 32752 +#define OBM_UPARROW 32753 +#define OBM_CLOSE 32754 +#define OBM_OLD_RESTORE 32755 +#define OBM_OLD_ZOOM 32756 +#define OBM_OLD_REDUCE 32757 +#define OBM_BTNCORNERS 32758 +#define OBM_CHECKBOXES 32759 +#define OBM_CHECK 32760 +#define OBM_BTSIZE 32761 +#define OBM_OLD_LFARROW 32762 +#define OBM_OLD_RGARROW 32763 +#define OBM_OLD_DNARROW 32764 +#define OBM_OLD_UPARROW 32765 +#define OBM_SIZE 32766 +#define OBM_OLD_CLOSE 32767 +#define WM_APP 0x8000 +#define HELP_TCARD 0x8000 +#define TBSTYLE_TRANSPARENT 0x8000 +#define RBS_DBLCLKTOGGLE 0x00008000 +#define LVS_NOSORTHEADER 0x8000 +#define TVS_NOHSCROLL 0x8000 +#define TCS_FOCUSNEVER 0x8000 +#define SC_SIZE 0xF000 +#define SC_SEPARATOR 0xF00F +#define SC_MOVE 0xF010 +#define SC_MINIMIZE 0xF020 +#define SC_MAXIMIZE 0xF030 +#define SC_NEXTWINDOW 0xF040 +#define SC_PREVWINDOW 0xF050 +#define SC_CLOSE 0xF060 +#define SC_VSCROLL 0xF070 +#define SC_HSCROLL 0xF080 +#define SC_MOUSEMENU 0xF090 +#define SC_KEYMENU 0xF100 +#define SC_ARRANGE 0xF110 +#define SC_RESTORE 0xF120 +#define SC_TASKLIST 0xF130 +#define SC_SCREENSAVE 0xF140 +#define SC_HOTKEY 0xF150 +#define SC_DEFAULT 0xF160 +#define SC_MONITORPOWER 0xF170 +#define SC_CONTEXTHELP 0xF180 +#define LVS_TYPESTYLEMASK 0xfc00 +#define SPVERSION_MASK 0x0000FF00 +#define HTERROR -2 +#define IDC_STATIC -1 +#define PWR_FAIL -1 +#define UNICODE_NOCHAR 0xFFFF +#define HTTRANSPARENT -1 // Next default values for new objects // @@ -65,7 +1542,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 106 #define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1036 +#define _APS_NEXT_CONTROL_VALUE 1037 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/Source/Plugins/Plugin_VideoDX9/Src/resource.rc b/Source/Plugins/Plugin_VideoDX9/Src/resource.rc index 4a9eaa9c79..f6d618b33d 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/resource.rc +++ b/Source/Plugins/Plugin_VideoDX9/Src/resource.rc @@ -2,6 +2,24 @@ // #include "resource.h" #include + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + ///////////////////////////////////////////////////////////////////////////// // // Dialog @@ -18,23 +36,27 @@ BEGIN LTEXT "Will not work correctly on older GPU:s.",IDC_STATIC,7,47,170,8 END -IDD_SETTINGS DIALOGEX 0, 0, 231, 141 +IDD_SETTINGS DIALOGEX 0, 0, 231, 174 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "&Graphics card:",IDC_STATIC,7,9,61,8 COMBOBOX IDC_ADAPTER,68,7,156,84,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "&Fullscreen",IDC_FULLSCREENENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,68,25,141,8 + CONTROL "&Fullscreen",IDC_FULLSCREENENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,68,25,56,8 CONTROL "&V-Sync",IDC_VSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,68,38,141,8 CONTROL "&Render to main window",IDC_RENDER_TO_MAINWINDOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,68,50,141,8 - LTEXT "Full&screen resolution:",IDC_STATIC,7,63,69,8 - COMBOBOX IDC_RESOLUTION,87,62,137,73,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "&Windowed resolution:",IDC_STATIC,7,82,74,8 - COMBOBOX IDC_RESOLUTIONWINDOWED,87,81,137,73,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Full&screen resolution:",IDC_STATIC,7,98,69,8 + COMBOBOX IDC_RESOLUTION,87,98,137,73,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "&Windowed resolution:",IDC_STATIC,7,117,74,8 + COMBOBOX IDC_RESOLUTIONWINDOWED,87,116,137,73,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Rotate windowed mode 90 degrees (for &Ikaruga)",IDC_CHECK1, - "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_DISABLED | WS_TABSTOP,87,97,137,17 - LTEXT "&Anti-alias mode:",IDC_STATIC,7,122,61,8 - COMBOBOX IDC_ANTIALIASMODE,68,121,156,73,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_DISABLED | WS_TABSTOP,87,132,137,17 + LTEXT "&Anti-alias mode:",IDC_STATIC,7,157,61,8 + COMBOBOX IDC_ANTIALIASMODE,68,155,156,73,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "&Aspect Ratio:",IDC_STATIC,7,66,52,8 + CONTROL "4:3",IDC_ASPECT_4_3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,68,66,59,11 + CONTROL "16:9",IDC_ASPECT_16_9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,68,80,49,11 + CONTROL "&Widescreen Hack",IDC_WIDESCREEN_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,128,81,73,10 END IDD_DEBUGGER DIALOGEX 0, 0, 234, 254 @@ -57,36 +79,27 @@ BEGIN GROUPBOX "&Settings",IDC_STATIC,7,7,192,81 CONTROL "&Wireframe",IDC_WIREFRAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,19,79,9 CONTROL "&Overlay some statistics",IDC_OVERLAYSTATS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,31,88,9 - CONTROL "Overlay &Projection Statistics",IDC_OVERLAYPROJSTATS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,42,118,9 + CONTROL "Overlay &Projection Statistics",IDC_OVERLAYPROJSTATS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,42,118,9 CONTROL "Show s&hader compilation errors",IDC_SHOWSHADERERRORS, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,53,127,9 GROUPBOX "&Data dumping",IDC_STATIC,7,91,192,42 CONTROL "Dump &textures",IDC_TEXDUMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,104,70,9 - // EDITTEXT IDC_TEXDUMPPATH,25,116,148,12,ES_AUTOHSCROLL - // PUSHBUTTON "...",IDC_BROWSETEXDUMPPATH,176,116,14,13 CONTROL "Dump Frames to User/Dump/Frames",IDC_DUMPFRAMES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,116,138,9 GROUPBOX "Texture Format Overlay",IDC_STATIC,7,136,192,30 CONTROL "Enable Overlay",IDC_TEXFMT_OVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,148,74,10 CONTROL "Centered",IDC_TEXFMT_CENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,148,82,10 END -IDD_ENHANCEMENTS DIALOGEX 0, 0, 207, 175 +IDD_ENHANCEMENTS DIALOGEX 0, 0, 224, 175 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - GROUPBOX "Texture &filtering",IDC_STATIC,7,7,193,50 + GROUPBOX "Texture &filtering",IDC_STATIC,7,7,210,50 CONTROL "Force &bi/trilinear (breaks video in several Wii games)",IDC_FORCEFILTERING, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,20,170,9 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,20,192,9 CONTROL "Enable 16x &anisotropy filtering",IDC_FORCEANISOTROPY, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,35,110,10 - GROUPBOX "Texture &enhancements",IDC_STATIC,7,61,193,34 - CONTROL "Pre-&upscale:",IDC_PREUPSCALE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,16,76,54,10 - COMBOBOX IDC_PREUPSCALETYPE,74,74,117,49,CBS_DROPDOWNLIST | CBS_SORT | WS_DISABLED | WS_VSCROLL | WS_TABSTOP - GROUPBOX "&Postprocess image",IDC_STATIC,7,102,192,59 - LTEXT "Effe&ct:",IDC_STATIC,14,118,36,8 - COMBOBOX IDC_POSTPROCESSEFFECT,74,117,117,71,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP - LTEXT "Pa&ram 1",IDC_PPPARAM1LABEL2,14,141,35,8 - CONTROL "",IDC_PPPARAM1,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_DISABLED | WS_TABSTOP,68,137,127,15 END @@ -115,7 +128,7 @@ BEGIN VERTGUIDE, 81 VERTGUIDE, 87 TOPMARGIN, 7 - BOTTOMMARGIN, 134 + BOTTOMMARGIN, 167 END IDD_DEBUGGER, DIALOG @@ -140,7 +153,7 @@ BEGIN IDD_ENHANCEMENTS, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 200 + RIGHTMARGIN, 217 VERTGUIDE, 16 VERTGUIDE, 74 TOPMARGIN, 7 @@ -148,3 +161,44 @@ BEGIN END END #endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + +À +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Source/Plugins/Plugin_VideoOGL/Src/BPFunctions.cpp b/Source/Plugins/Plugin_VideoOGL/Src/BPFunctions.cpp index 8091466821..ee663307e5 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/BPFunctions.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/BPFunctions.cpp @@ -128,11 +128,6 @@ void CopyEFB(const BPCmd &bp, const EFBRectangle &rc, const u32 &address, const } } -void RenderToXFB(const BPCmd &bp, const EFBRectangle &rc, const float &yScale, const float &xfbLines, u32 xfbAddr, const u32 &dstWidth, const u32 &dstHeight) -{ - Renderer::RenderToXFB(xfbAddr, dstWidth, dstHeight, rc); -} - void ClearScreen(const BPCmd &bp, const EFBRectangle &rc) { bool colorEnable = bpmem.blendmode.colorupdate; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 09d74849c3..17bd5d50a4 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -307,7 +307,7 @@ bool Renderer::Init() // Adjust all heights with this ratio, the resulting height will be the same as H or EFB_HEIGHT. I.e. // 768 (-1) for 1024x768 etc. - m_FrameBufferHeight *= 528.0 / 480.0; + m_FrameBufferHeight *= (float)EFB_HEIGHT / 480.0; // Ensure a minimum target size so that the native res target always fits if (m_FrameBufferWidth < EFB_WIDTH) m_FrameBufferWidth = EFB_WIDTH; @@ -989,29 +989,6 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight) #endif // Place messages on the picture, then copy it to the screen - SwapBuffers(); - - RestoreAPIState(); - - GL_REPORT_ERRORD(); - g_Config.iSaveTargetId = 0; - - bool last_copy_efb_to_ram = g_ActiveConfig.bCopyEFBToRAM; - UpdateActiveConfig(); - if (last_copy_efb_to_ram != g_ActiveConfig.bCopyEFBToRAM) - TextureMngr::ClearRenderTargets(); - - // For testing zbuffer targets. - // Renderer::SetZBufferRender(); - // SaveTexture("tex.tga", GL_TEXTURE_RECTANGLE_ARB, s_FakeZTarget, GetTargetWidth(), GetTargetHeight()); -} - - - -// We can now draw whatever we want on top of the picture. Then we copy the final picture to the output. -// ---------------------------- -void Renderer::SwapBuffers() -{ // --------------------------------------------------------------------- // Count FPS. // ------------- @@ -1084,8 +1061,21 @@ void Renderer::SwapBuffers() g_framebufferManager.SetFramebuffer(0); GL_REPORT_ERRORD(); -} + RestoreAPIState(); + + GL_REPORT_ERRORD(); + g_Config.iSaveTargetId = 0; + + bool last_copy_efb_to_ram = g_ActiveConfig.bCopyEFBToRAM; + UpdateActiveConfig(); + if (last_copy_efb_to_ram != g_ActiveConfig.bCopyEFBToRAM) + TextureMngr::ClearRenderTargets(); + + // For testing zbuffer targets. + // Renderer::SetZBufferRender(); + // SaveTexture("tex.tga", GL_TEXTURE_RECTANGLE_ARB, s_FakeZTarget, GetTargetWidth(), GetTargetHeight()); +} // Create On-Screen-Messages void Renderer::DrawDebugText()