From 9fa49445364595143ab181dd15b4f66b821cab58 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Thu, 28 Jan 2010 02:53:10 +0000 Subject: [PATCH] GSdx: Removed obsolete/redundant options from the configuration dialog (vsync, fullscreen, and other things now controlled by 0.9.7). This only affects GSdx when run from 0.9.7 -- older versions of PCSX2 still have the same options. PCSX2: Added an optional PS2EsetEmuVersion callback for plugins, so that plugins (like GSdx) can alter behavior based on the version of emulator calling them. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2530 96395faa-99c1-11dd-bbfe-3dabce05a288 --- common/include/PS2Edefs.h | 2 + pcsx2/PluginManager.cpp | 6 + pcsx2/gui/Panels/PluginSelectorPanel.cpp | 7 +- plugins/CDVDiso/src/CDVDisop.cpp | 1008 +++++++++++----------- plugins/GSdx/GS.cpp | 14 +- plugins/GSdx/GSRenderer.cpp | 15 +- plugins/GSdx/GSSettingsDlg.cpp | 6 +- plugins/GSdx/GSSettingsDlg.h | 5 +- plugins/GSdx/GSdx.def | 1 + plugins/GSdx/GSdx.rc | 121 ++- plugins/GSdx/resource.h | 4 +- 11 files changed, 629 insertions(+), 560 deletions(-) diff --git a/common/include/PS2Edefs.h b/common/include/PS2Edefs.h index a76b5f64ea..b978a975b8 100644 --- a/common/include/PS2Edefs.h +++ b/common/include/PS2Edefs.h @@ -536,6 +536,8 @@ typedef u32 (CALLBACK* _PS2EgetLibType)(void); typedef u32 (CALLBACK* _PS2EgetLibVersion2)(u32 type); typedef char*(CALLBACK* _PS2EgetLibName)(void); +typedef void (CALLBACK* _PS2EsetEmuVersion)(const char* emuId, u32 version); // HACK to let some plugins know it's 0.9.7 PCSX2 --air + // GS // NOTE: GSreadFIFOX/GSwriteCSR functions CANNOT use XMM/MMX regs // If you want to use them, need to save and restore current ones diff --git a/pcsx2/PluginManager.cpp b/pcsx2/PluginManager.cpp index ea5f9af63c..8c61e916ea 100644 --- a/pcsx2/PluginManager.cpp +++ b/pcsx2/PluginManager.cpp @@ -701,6 +701,8 @@ static void PS2E_CALLBACK pcsx2_OSD_WriteLn( int icon, const char* msg ) PluginManager::PluginManager( const wxString (&folders)[PluginId_Count] ) { + wxDoNotLogInThisScope please; + Console.WriteLn( Color_StrongBlue, "Loading plugins..." ); const PluginInfo* pi = tbl_PluginInfo; do @@ -734,6 +736,7 @@ PluginManager::PluginManager( const wxString (&folders)[PluginId_Count] ) _PS2EgetLibName GetLibName = (_PS2EgetLibName) m_info[pid].Lib.GetSymbol( L"PS2EgetLibName" ); _PS2EgetLibVersion2 GetLibVersion2 = (_PS2EgetLibVersion2) m_info[pid].Lib.GetSymbol( L"PS2EgetLibVersion2" ); + _PS2EsetEmuVersion SetEmuVersion = (_PS2EsetEmuVersion) m_info[pid].Lib.GetSymbol( L"PS2EsetEmuVersion" ); if( GetLibName == NULL || GetLibVersion2 == NULL ) throw Exception::PluginLoadError( pid, m_info[pid].Filename, @@ -741,6 +744,9 @@ PluginManager::PluginManager( const wxString (&folders)[PluginId_Count] ) _( "Configured plugin is not a PCSX2 plugin, or is for an older unsupported version of PCSX2." ) ); + if( SetEmuVersion != NULL ) + SetEmuVersion( "PCSX2", (0ul << 24) | (9ul<<16) | (7ul<<8) | 0 ); + m_info[pid].Name = fromUTF8( GetLibName() ); int version = GetLibVersion2( tbl_PluginInfo[pid].typemask ); m_info[pid].Version.Printf( L"%d.%d.%d", (version>>8)&0xff, version&0xff, (version>>24)&0xff ); diff --git a/pcsx2/gui/Panels/PluginSelectorPanel.cpp b/pcsx2/gui/Panels/PluginSelectorPanel.cpp index b42860bb09..b8308e94c5 100644 --- a/pcsx2/gui/Panels/PluginSelectorPanel.cpp +++ b/pcsx2/gui/Panels/PluginSelectorPanel.cpp @@ -83,9 +83,8 @@ public: // BadStream - thrown if the provided file is simply not a loadable DLL. // NotEnumerablePlugin - thrown if the DLL is not a PCSX2 plugin, or if it's of an unsupported version. // - PluginEnumerator( const wxString& plugpath ) : - m_plugpath( plugpath ) - , m_plugin() + PluginEnumerator( const wxString& plugpath ) + : m_plugpath( plugpath ) { if( !m_plugin.Load( m_plugpath ) ) throw Exception::BadStream( m_plugpath, "File is not a valid dynamic library." ); @@ -95,7 +94,7 @@ public: m_GetLibName = (_PS2EgetLibName)m_plugin.GetSymbol( L"PS2EgetLibName" ); m_GetLibVersion2 = (_PS2EgetLibVersion2)m_plugin.GetSymbol( L"PS2EgetLibVersion2" ); - if( m_GetLibType == NULL || m_GetLibName == NULL || m_GetLibVersion2 == NULL ) + if( m_GetLibType == NULL || m_GetLibName == NULL || m_GetLibVersion2 == NULL) throw Exception::NotEnumerablePlugin( m_plugpath ); m_type = m_GetLibType(); diff --git a/plugins/CDVDiso/src/CDVDisop.cpp b/plugins/CDVDiso/src/CDVDisop.cpp index 2840ccabae..42af1056b1 100755 --- a/plugins/CDVDiso/src/CDVDisop.cpp +++ b/plugins/CDVDiso/src/CDVDisop.cpp @@ -1,285 +1,285 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "CDVDiso.h" -#include "Config.h" - -#ifndef MAX_PATH -#define MAX_PATH 255 -#endif - -char IsoFile[256]; -char IsoCWD[256]; -char CdDev[256]; - -_cdIso cdIso[8]; -u8 *pbuffer; -int cdblocksize; -int cdblockofs; -int cdoffset; -int cdtype; -int cdblocks; - -int Zmode; // 1 Z - 2 bz2 -int fmode; // 0 - file / 1 - Zfile -char *Ztable; - -int BlockDump; -isoFile *fdump; -isoFile *iso; - -FILE *cdvdLog = NULL; - -// This var is used to detect resume-style behavior of the Pcsx2 emulator, -// and skip prompting the user for a new CD when it's likely they want to run the existing one. -static char cdvdCurrentIso[MAX_PATH]; - -char *methods[] = -{ - ".Z - compress faster", - ".BZ - compress better", - NULL -}; - -#ifdef PCSX2_DEBUG -char *LibName = "Linuz Iso CDVD (Debug) "; -#else -char *LibName = "Linuz Iso CDVD "; -#endif - -const u8 version = PS2E_CDVD_VERSION; -const u8 revision = 0; -const u8 build = 9; - -u8 cdbuffer[CD_FRAMESIZE_RAW * 10] = {0}; - -s32 msf_to_lba(u8 m, u8 s, u8 f) -{ - u32 lsn; - lsn = f; - lsn += (s - 2) * 75; - lsn += m * 75 * 60; - return lsn; -} - -void lba_to_msf(s32 lba, u8* m, u8* s, u8* f) -{ - lba += 150; - *m = lba / (60 * 75); - *s = (lba / 75) % 60; - *f = lba % 75; -} - -#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */ -#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */ - - -EXPORT_C_(char*) PS2EgetLibName() -{ - return LibName; -} - -EXPORT_C_(u32) PS2EgetLibType() -{ - return PS2E_LT_CDVD; -} - -EXPORT_C_(u32) PS2EgetLibVersion2(u32 type) -{ - return (version << 16) | (revision << 8) | build; -} - -#ifdef PCSX2_DEBUG -void __Log(char *fmt, ...) -{ - va_list list; - - if (cdvdLog == NULL) return; - - va_start(list, fmt); - vfprintf(cdvdLog, fmt, list); - va_end(list); -} -#else -#define __Log 0&& -#endif - - -EXPORT_C_(s32) CDVDinit() -{ -#ifdef PCSX2_DEBUG - cdvdLog = fopen("logs/cdvdLog.txt", "w"); - if (cdvdLog == NULL) - { - cdvdLog = fopen("cdvdLog.txt", "w"); - if (cdvdLog == NULL) - { - SysMessage("Can't create cdvdLog.txt"); - return -1; - } - } - setvbuf(cdvdLog, NULL, _IONBF, 0); - CDVD_LOG("CDVDinit\n"); -#endif - - cdvdCurrentIso[0] = 0; - memset(cdIso, 0, sizeof(cdIso)); - return 0; -} - -EXPORT_C_(void) CDVDshutdown() -{ - cdvdCurrentIso[0] = 0; -#ifdef CDVD_LOG - if (cdvdLog != NULL) fclose(cdvdLog); -#endif -} - -EXPORT_C_(s32) CDVDopen(const char* pTitle) -{ - LoadConf(); - - if (pTitle != NULL) strcpy(IsoFile, pTitle); - - if (*IsoFile == 0) strcpy(IsoFile, cdvdCurrentIso); - - if (*IsoFile == 0) - { - char temp[256]; - - CfgOpenFile(); - - LoadConf(); - strcpy(temp, IsoFile); - *IsoFile = 0; - SaveConf(); - strcpy(IsoFile, temp); - } - - iso = isoOpen(IsoFile); - if (iso == NULL) - { - SysMessage("Error loading %s\n", IsoFile); - return -1; - } - - if (iso->type == ISOTYPE_DVD) - cdtype = CDVD_TYPE_PS2DVD; - else if (iso->type == ISOTYPE_AUDIO) - cdtype = CDVD_TYPE_CDDA; - else - cdtype = CDVD_TYPE_PS2CD; - - if (BlockDump) - { - char fname_only[MAX_PATH]; - -#ifdef _WIN32 - char fname[MAX_PATH], ext[MAX_PATH]; - _splitpath(IsoFile, NULL, NULL, fname, ext); - _makepath(fname_only, NULL, NULL, fname, NULL); -#else - char* p, *plast; - - plast = p = strchr(IsoFile, '/'); - while (p != NULL) - { - plast = p; - p = strchr(p + 1, '/'); - } - - // Lets not create dumps in the plugin directory. - strcpy(fname_only, "../"); - if (plast != NULL) - strcat(fname_only, plast + 1); - else - strcat(fname_only, IsoFile); - - plast = p = strchr(fname_only, '.'); - - while (p != NULL) - { - plast = p; - p = strchr(p + 1, '.'); - } - - if (plast != NULL) *plast = 0; - -#endif - strcat(fname_only, ".dump"); - fdump = isoCreate(fname_only, ISOFLAGS_BLOCKDUMP); - if (fdump) isoSetFormat(fdump, iso->blockofs, iso->blocksize, iso->blocks); - } - else - { - fdump = NULL; - } - - return 0; -} - -EXPORT_C_(void) CDVDclose() -{ - - strcpy(cdvdCurrentIso, IsoFile); - - isoClose(iso); - if (fdump != NULL) isoClose(fdump); -} - -EXPORT_C_(s32) CDVDreadSubQ(u32 lsn, cdvdSubQ* subq) -{ - // fake it - u8 min, sec, frm; - subq->ctrl = 4; - subq->mode = 1; - subq->trackNum = itob(1); - subq->trackIndex = itob(1); - - lba_to_msf(lsn, &min, &sec, &frm); - subq->trackM = itob(min); - subq->trackS = itob(sec); - subq->trackF = itob(frm); - - subq->pad = 0; - - lba_to_msf(lsn + (2*75), &min, &sec, &frm); - subq->discM = itob(min); - subq->discS = itob(sec); - subq->discF = itob(frm); - return 0; -} - -EXPORT_C_(s32) CDVDgetTN(cdvdTN *Buffer) -{ - Buffer->strack = 1; - Buffer->etrack = 1; - - return 0; -} - -EXPORT_C_(s32) CDVDgetTD(u8 Track, cdvdTD *Buffer) -{ - if (Track == 0) - { - Buffer->lsn = iso->blocks; - } - else - { - Buffer->type = CDVD_MODE1_TRACK; - Buffer->lsn = 0; - } - - return 0; -} - -static s32 layer1start = -1; +#include +#include +#include +#include +#include +#include +#include +#include + +#include "CDVDiso.h" +#include "Config.h" + +#ifndef MAX_PATH +#define MAX_PATH 255 +#endif + +char IsoFile[256]; +char IsoCWD[256]; +char CdDev[256]; + +_cdIso cdIso[8]; +u8 *pbuffer; +int cdblocksize; +int cdblockofs; +int cdoffset; +int cdtype; +int cdblocks; + +int Zmode; // 1 Z - 2 bz2 +int fmode; // 0 - file / 1 - Zfile +char *Ztable; + +int BlockDump; +isoFile *fdump; +isoFile *iso; + +FILE *cdvdLog = NULL; + +// This var is used to detect resume-style behavior of the Pcsx2 emulator, +// and skip prompting the user for a new CD when it's likely they want to run the existing one. +static char cdvdCurrentIso[MAX_PATH]; + +char *methods[] = +{ + ".Z - compress faster", + ".BZ - compress better", + NULL +}; + +#ifdef PCSX2_DEBUG +char *LibName = "Linuz Iso CDVD (Debug) "; +#else +char *LibName = "Linuz Iso CDVD "; +#endif + +const u8 version = PS2E_CDVD_VERSION; +const u8 revision = 0; +const u8 build = 9; + +u8 cdbuffer[CD_FRAMESIZE_RAW * 10] = {0}; + +s32 msf_to_lba(u8 m, u8 s, u8 f) +{ + u32 lsn; + lsn = f; + lsn += (s - 2) * 75; + lsn += m * 75 * 60; + return lsn; +} + +void lba_to_msf(s32 lba, u8* m, u8* s, u8* f) +{ + lba += 150; + *m = lba / (60 * 75); + *s = (lba / 75) % 60; + *f = lba % 75; +} + +#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */ +#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */ + + +EXPORT_C_(char*) PS2EgetLibName() +{ + return LibName; +} + +EXPORT_C_(u32) PS2EgetLibType() +{ + return PS2E_LT_CDVD; +} + +EXPORT_C_(u32) PS2EgetLibVersion2(u32 type) +{ + return (version << 16) | (revision << 8) | build; +} + +#ifdef PCSX2_DEBUG +void __Log(char *fmt, ...) +{ + va_list list; + + if (cdvdLog == NULL) return; + + va_start(list, fmt); + vfprintf(cdvdLog, fmt, list); + va_end(list); +} +#else +#define __Log 0&& +#endif + + +EXPORT_C_(s32) CDVDinit() +{ +#ifdef PCSX2_DEBUG + cdvdLog = fopen("logs/cdvdLog.txt", "w"); + if (cdvdLog == NULL) + { + cdvdLog = fopen("cdvdLog.txt", "w"); + if (cdvdLog == NULL) + { + SysMessage("Can't create cdvdLog.txt"); + return -1; + } + } + setvbuf(cdvdLog, NULL, _IONBF, 0); + CDVD_LOG("CDVDinit\n"); +#endif + + cdvdCurrentIso[0] = 0; + memset(cdIso, 0, sizeof(cdIso)); + return 0; +} + +EXPORT_C_(void) CDVDshutdown() +{ + cdvdCurrentIso[0] = 0; +#ifdef CDVD_LOG + if (cdvdLog != NULL) fclose(cdvdLog); +#endif +} + +EXPORT_C_(s32) CDVDopen(const char* pTitle) +{ + LoadConf(); + + if (pTitle != NULL) strcpy(IsoFile, pTitle); + + if (*IsoFile == 0) strcpy(IsoFile, cdvdCurrentIso); + + if (*IsoFile == 0) + { + char temp[256]; + + CfgOpenFile(); + + LoadConf(); + strcpy(temp, IsoFile); + *IsoFile = 0; + SaveConf(); + strcpy(IsoFile, temp); + } + + iso = isoOpen(IsoFile); + if (iso == NULL) + { + SysMessage("Error loading %s\n", IsoFile); + return -1; + } + + if (iso->type == ISOTYPE_DVD) + cdtype = CDVD_TYPE_PS2DVD; + else if (iso->type == ISOTYPE_AUDIO) + cdtype = CDVD_TYPE_CDDA; + else + cdtype = CDVD_TYPE_PS2CD; + + if (BlockDump) + { + char fname_only[MAX_PATH]; + +#ifdef _WIN32 + char fname[MAX_PATH], ext[MAX_PATH]; + _splitpath(IsoFile, NULL, NULL, fname, ext); + _makepath(fname_only, NULL, NULL, fname, NULL); +#else + char* p, *plast; + + plast = p = strchr(IsoFile, '/'); + while (p != NULL) + { + plast = p; + p = strchr(p + 1, '/'); + } + + // Lets not create dumps in the plugin directory. + strcpy(fname_only, "../"); + if (plast != NULL) + strcat(fname_only, plast + 1); + else + strcat(fname_only, IsoFile); + + plast = p = strchr(fname_only, '.'); + + while (p != NULL) + { + plast = p; + p = strchr(p + 1, '.'); + } + + if (plast != NULL) *plast = 0; + +#endif + strcat(fname_only, ".dump"); + fdump = isoCreate(fname_only, ISOFLAGS_BLOCKDUMP); + if (fdump) isoSetFormat(fdump, iso->blockofs, iso->blocksize, iso->blocks); + } + else + { + fdump = NULL; + } + + return 0; +} + +EXPORT_C_(void) CDVDclose() +{ + + strcpy(cdvdCurrentIso, IsoFile); + + isoClose(iso); + if (fdump != NULL) isoClose(fdump); +} + +EXPORT_C_(s32) CDVDreadSubQ(u32 lsn, cdvdSubQ* subq) +{ + // fake it + u8 min, sec, frm; + subq->ctrl = 4; + subq->mode = 1; + subq->trackNum = itob(1); + subq->trackIndex = itob(1); + + lba_to_msf(lsn, &min, &sec, &frm); + subq->trackM = itob(min); + subq->trackS = itob(sec); + subq->trackF = itob(frm); + + subq->pad = 0; + + lba_to_msf(lsn + (2*75), &min, &sec, &frm); + subq->discM = itob(min); + subq->discS = itob(sec); + subq->discF = itob(frm); + return 0; +} + +EXPORT_C_(s32) CDVDgetTN(cdvdTN *Buffer) +{ + Buffer->strack = 1; + Buffer->etrack = 1; + + return 0; +} + +EXPORT_C_(s32) CDVDgetTD(u8 Track, cdvdTD *Buffer) +{ + if (Track == 0) + { + Buffer->lsn = iso->blocks; + } + else + { + Buffer->type = CDVD_MODE1_TRACK; + Buffer->lsn = 0; + } + + return 0; +} + +static s32 layer1start = -1; static bool testForPartitionInfo( const u8 (&tempbuffer)[CD_FRAMESIZE_RAW] ) { @@ -294,58 +294,58 @@ static bool testForPartitionInfo( const u8 (&tempbuffer)[CD_FRAMESIZE_RAW] ) (tempbuffer[off+5] == 0x31) ); } - -EXPORT_C_(s32) CDVDgetTOC(void* toc) -{ - u8 type = CDVDgetDiskType(); - u8* tocBuff = (u8*)toc; - - //__Log("CDVDgetTOC\n"); - - if (type == CDVD_TYPE_DVDV || type == CDVD_TYPE_PS2DVD) - { - // get dvd structure format - // scsi command 0x43 - memset(tocBuff, 0, 2048); - - if (layer1start != -2 && iso->blocks >= 0x300000) - { - int off = iso->blockofs; - - // dual sided - tocBuff[ 0] = 0x24; - tocBuff[ 1] = 0x02; - tocBuff[ 2] = 0xF2; - tocBuff[ 3] = 0x00; - tocBuff[ 4] = 0x41; - tocBuff[ 5] = 0x95; - - tocBuff[14] = 0x60; // dual sided, ptp - - tocBuff[16] = 0x00; - tocBuff[17] = 0x03; - tocBuff[18] = 0x00; - tocBuff[19] = 0x00; - - // search for it - if (layer1start == -1) - { - printf("CDVD: searching for layer1..."); - - /*tempbuffer = (u8*)malloc(CD_FRAMESIZE_RAW * 10); - for (layer1start = (iso->blocks / 2 - 0x10) & ~0xf; layer1start < 0x200010; layer1start += 16) - { - isoReadBlock(iso, tempbuffer, layer1start); - // CD001 - if (tempbuffer[off+1] == 0x43 && - tempbuffer[off+2] == 0x44 && - tempbuffer[off+3] == 0x30 && - tempbuffer[off+4] == 0x30 && - tempbuffer[off+5] == 0x31) - break; - } - free(tempbuffer);*/ - + +EXPORT_C_(s32) CDVDgetTOC(void* toc) +{ + u8 type = CDVDgetDiskType(); + u8* tocBuff = (u8*)toc; + + //__Log("CDVDgetTOC\n"); + + if (type == CDVD_TYPE_DVDV || type == CDVD_TYPE_PS2DVD) + { + // get dvd structure format + // scsi command 0x43 + memset(tocBuff, 0, 2048); + + if (layer1start != -2 && iso->blocks >= 0x300000) + { + int off = iso->blockofs; + + // dual sided + tocBuff[ 0] = 0x24; + tocBuff[ 1] = 0x02; + tocBuff[ 2] = 0xF2; + tocBuff[ 3] = 0x00; + tocBuff[ 4] = 0x41; + tocBuff[ 5] = 0x95; + + tocBuff[14] = 0x60; // dual sided, ptp + + tocBuff[16] = 0x00; + tocBuff[17] = 0x03; + tocBuff[18] = 0x00; + tocBuff[19] = 0x00; + + // search for it + if (layer1start == -1) + { + printf("CDVD: searching for layer1..."); + + /*tempbuffer = (u8*)malloc(CD_FRAMESIZE_RAW * 10); + for (layer1start = (iso->blocks / 2 - 0x10) & ~0xf; layer1start < 0x200010; layer1start += 16) + { + isoReadBlock(iso, tempbuffer, layer1start); + // CD001 + if (tempbuffer[off+1] == 0x43 && + tempbuffer[off+2] == 0x44 && + tempbuffer[off+3] == 0x30 && + tempbuffer[off+4] == 0x30 && + tempbuffer[off+5] == 0x31) + break; + } + free(tempbuffer);*/ + uint midsector = (iso->blocks / 2) & ~0xf; uint deviation = 0; @@ -372,173 +372,173 @@ EXPORT_C_(s32) CDVDgetTOC(void* toc) } deviation += 16; } - - - if (layer1start == -1) - { - printf("(LinuzCDVDiso): Couldn't find second layer on dual layer... ignoring\n"); - // fake it - tocBuff[ 0] = 0x04; - tocBuff[ 1] = 0x02; - tocBuff[ 2] = 0xF2; - tocBuff[ 3] = 0x00; - tocBuff[ 4] = 0x86; - tocBuff[ 5] = 0x72; - - tocBuff[16] = 0x00; - tocBuff[17] = 0x03; - tocBuff[18] = 0x00; - tocBuff[19] = 0x00; - layer1start = -2; - return 0; - } - - printf("(LinuzCDVDiso): found at 0x%8.8x\n", layer1start); - layer1start = layer1start + 0x30000 - 1; - } - - tocBuff[20] = layer1start >> 24; - tocBuff[21] = (layer1start >> 16) & 0xff; - tocBuff[22] = (layer1start >> 8) & 0xff; - tocBuff[23] = (layer1start >> 0) & 0xff; - } - else - { - // fake it - tocBuff[ 0] = 0x04; - tocBuff[ 1] = 0x02; - tocBuff[ 2] = 0xF2; - tocBuff[ 3] = 0x00; - tocBuff[ 4] = 0x86; - tocBuff[ 5] = 0x72; - - tocBuff[16] = 0x00; - tocBuff[17] = 0x03; - tocBuff[18] = 0x00; - tocBuff[19] = 0x00; - } - } - else if ((type == CDVD_TYPE_CDDA) || (type == CDVD_TYPE_PS2CDDA) || - (type == CDVD_TYPE_PS2CD) || (type == CDVD_TYPE_PSCDDA) || (type == CDVD_TYPE_PSCD)) - { - // cd toc - // (could be replaced by 1 command that reads the full toc) - u8 min, sec, frm; - s32 i, err; - cdvdTN diskInfo; - cdvdTD trackInfo; - memset(tocBuff, 0, 1024); - if (CDVDgetTN(&diskInfo) == -1) - { - diskInfo.etrack = 0; - diskInfo.strack = 1; - } - if (CDVDgetTD(0, &trackInfo) == -1) trackInfo.lsn = 0; - - tocBuff[0] = 0x41; - tocBuff[1] = 0x00; - - //Number of FirstTrack - tocBuff[2] = 0xA0; - tocBuff[7] = itob(diskInfo.strack); - - //Number of LastTrack - tocBuff[12] = 0xA1; - tocBuff[17] = itob(diskInfo.etrack); - - //DiskLength - lba_to_msf(trackInfo.lsn, &min, &sec, &frm); - tocBuff[22] = 0xA2; - tocBuff[27] = itob(min); - tocBuff[28] = itob(sec); - - for (i = diskInfo.strack; i <= diskInfo.etrack; i++) - { - err = CDVDgetTD(i, &trackInfo); - lba_to_msf(trackInfo.lsn, &min, &sec, &frm); - tocBuff[i*10+30] = trackInfo.type; - tocBuff[i*10+32] = err == -1 ? 0 : itob(i); //number - tocBuff[i*10+37] = itob(min); - tocBuff[i*10+38] = itob(sec); - tocBuff[i*10+39] = itob(frm); - } - } - else - return -1; - - return 0; -} - -EXPORT_C_(s32) CDVDreadTrack(u32 lsn, int mode) -{ - int _lsn = lsn; - - //__Log("CDVDreadTrack: %x %x\n", lsn, mode); - if (_lsn < 0) - { -// lsn = 2097152 + (-_lsn); - lsn = iso->blocks - (-_lsn); - } -// printf ("CDRreadTrack %d\n", lsn); - - isoReadBlock(iso, cdbuffer, lsn); - if (fdump != NULL) - { - isoWriteBlock(fdump, cdbuffer, lsn); - } - - pbuffer = cdbuffer; - switch (mode) - { - case CDVD_MODE_2352: - break; - case CDVD_MODE_2340: - pbuffer += 12; - break; - case CDVD_MODE_2328: - pbuffer += 24; - break; - case CDVD_MODE_2048: - pbuffer += 24; - break; - } - - return 0; -} - -EXPORT_C_(u8*) CDVDgetBuffer() -{ - return pbuffer; -} - -EXPORT_C_(s32) CDVDgetDiskType() -{ - return cdtype; -} - -EXPORT_C_(s32) CDVDgetTrayStatus() -{ - return CDVD_TRAY_CLOSE; -} - -EXPORT_C_(s32) CDVDctrlTrayOpen() -{ - return 0; -} -EXPORT_C_(s32) CDVDctrlTrayClose() -{ - return 0; -} - - -EXPORT_C_(s32) CDVDtest() -{ - if (*IsoFile == 0) return 0; - - iso = isoOpen(IsoFile); - if (iso == NULL) return -1; - isoClose(iso); - - return 0; -} - + + + if (layer1start == -1) + { + printf("(LinuzCDVDiso): Couldn't find second layer on dual layer... ignoring\n"); + // fake it + tocBuff[ 0] = 0x04; + tocBuff[ 1] = 0x02; + tocBuff[ 2] = 0xF2; + tocBuff[ 3] = 0x00; + tocBuff[ 4] = 0x86; + tocBuff[ 5] = 0x72; + + tocBuff[16] = 0x00; + tocBuff[17] = 0x03; + tocBuff[18] = 0x00; + tocBuff[19] = 0x00; + layer1start = -2; + return 0; + } + + printf("(LinuzCDVDiso): found at 0x%8.8x\n", layer1start); + layer1start = layer1start + 0x30000 - 1; + } + + tocBuff[20] = layer1start >> 24; + tocBuff[21] = (layer1start >> 16) & 0xff; + tocBuff[22] = (layer1start >> 8) & 0xff; + tocBuff[23] = (layer1start >> 0) & 0xff; + } + else + { + // fake it + tocBuff[ 0] = 0x04; + tocBuff[ 1] = 0x02; + tocBuff[ 2] = 0xF2; + tocBuff[ 3] = 0x00; + tocBuff[ 4] = 0x86; + tocBuff[ 5] = 0x72; + + tocBuff[16] = 0x00; + tocBuff[17] = 0x03; + tocBuff[18] = 0x00; + tocBuff[19] = 0x00; + } + } + else if ((type == CDVD_TYPE_CDDA) || (type == CDVD_TYPE_PS2CDDA) || + (type == CDVD_TYPE_PS2CD) || (type == CDVD_TYPE_PSCDDA) || (type == CDVD_TYPE_PSCD)) + { + // cd toc + // (could be replaced by 1 command that reads the full toc) + u8 min, sec, frm; + s32 i, err; + cdvdTN diskInfo; + cdvdTD trackInfo; + memset(tocBuff, 0, 1024); + if (CDVDgetTN(&diskInfo) == -1) + { + diskInfo.etrack = 0; + diskInfo.strack = 1; + } + if (CDVDgetTD(0, &trackInfo) == -1) trackInfo.lsn = 0; + + tocBuff[0] = 0x41; + tocBuff[1] = 0x00; + + //Number of FirstTrack + tocBuff[2] = 0xA0; + tocBuff[7] = itob(diskInfo.strack); + + //Number of LastTrack + tocBuff[12] = 0xA1; + tocBuff[17] = itob(diskInfo.etrack); + + //DiskLength + lba_to_msf(trackInfo.lsn, &min, &sec, &frm); + tocBuff[22] = 0xA2; + tocBuff[27] = itob(min); + tocBuff[28] = itob(sec); + + for (i = diskInfo.strack; i <= diskInfo.etrack; i++) + { + err = CDVDgetTD(i, &trackInfo); + lba_to_msf(trackInfo.lsn, &min, &sec, &frm); + tocBuff[i*10+30] = trackInfo.type; + tocBuff[i*10+32] = err == -1 ? 0 : itob(i); //number + tocBuff[i*10+37] = itob(min); + tocBuff[i*10+38] = itob(sec); + tocBuff[i*10+39] = itob(frm); + } + } + else + return -1; + + return 0; +} + +EXPORT_C_(s32) CDVDreadTrack(u32 lsn, int mode) +{ + int _lsn = lsn; + + //__Log("CDVDreadTrack: %x %x\n", lsn, mode); + if (_lsn < 0) + { +// lsn = 2097152 + (-_lsn); + lsn = iso->blocks - (-_lsn); + } +// printf ("CDRreadTrack %d\n", lsn); + + isoReadBlock(iso, cdbuffer, lsn); + if (fdump != NULL) + { + isoWriteBlock(fdump, cdbuffer, lsn); + } + + pbuffer = cdbuffer; + switch (mode) + { + case CDVD_MODE_2352: + break; + case CDVD_MODE_2340: + pbuffer += 12; + break; + case CDVD_MODE_2328: + pbuffer += 24; + break; + case CDVD_MODE_2048: + pbuffer += 24; + break; + } + + return 0; +} + +EXPORT_C_(u8*) CDVDgetBuffer() +{ + return pbuffer; +} + +EXPORT_C_(s32) CDVDgetDiskType() +{ + return cdtype; +} + +EXPORT_C_(s32) CDVDgetTrayStatus() +{ + return CDVD_TRAY_CLOSE; +} + +EXPORT_C_(s32) CDVDctrlTrayOpen() +{ + return 0; +} +EXPORT_C_(s32) CDVDctrlTrayClose() +{ + return 0; +} + + +EXPORT_C_(s32) CDVDtest() +{ + if (*IsoFile == 0) return 0; + + iso = isoOpen(IsoFile); + if (iso == NULL) return -1; + isoClose(iso); + + return 0; +} + diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index d0553b0e23..6271435362 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -43,6 +43,8 @@ static bool s_framelimit = true; static bool s_vsync = false; static bool s_exclusive = true; +static bool s_IsGsOpen2 = false; // boolean to remove some stuff from the config panel in new PCSX2's/ + EXPORT_C_(uint32) PS2EgetLibType() { return PS2E_LT_GS; @@ -61,6 +63,11 @@ EXPORT_C_(uint32) PS2EgetLibVersion2(uint32 type) return (build << 0) | (revision << 8) | (PS2E_GS_VERSION << 16) | (PLUGIN_VERSION << 24); } +EXPORT_C_(void) PS2EsetEmuVersion(const char* emuId, uint32 version) +{ + s_IsGsOpen2 = true; +} + EXPORT_C_(uint32) PS2EgetCpuPlatform() { #if _M_AMD64 @@ -386,7 +393,7 @@ EXPORT_C GSconfigure() { if( !GSUtil::CheckSSE() ) return; - if( GSSettingsDlg().DoModal() == IDOK ) + if( GSSettingsDlg( s_IsGsOpen2 ).DoModal() == IDOK ) { if( s_gs != NULL && s_gs->m_wnd.IsManaged() ) { @@ -462,6 +469,11 @@ EXPORT_C GSgetLastTag(uint32* tag) s_gs->GetLastTag(tag); } +EXPORT_C GSgetTitleInfo(char dest[128]) +{ + //s_gs->GetWindowTitle +} + EXPORT_C GSsetFrameSkip(int frameskip) { s_gs->SetFrameSkip(frameskip); diff --git a/plugins/GSdx/GSRenderer.cpp b/plugins/GSdx/GSRenderer.cpp index 4835a7f24b..72fa411d4e 100644 --- a/plugins/GSdx/GSRenderer.cpp +++ b/plugins/GSdx/GSRenderer.cpp @@ -308,7 +308,7 @@ void GSRenderer::VSync(int field) // osd - if((m_perfmon.GetFrame() & 0x1f) == 0) + if((m_perfmon.GetFrame() & 0x1f) == 0 && m_wnd.IsManaged()) { m_perfmon.Update(); @@ -344,12 +344,13 @@ void GSRenderer::VSync(int field) s += " | Recording..."; } - if( !m_wnd.SetWindowText(s.c_str()) ) - { - // [TODO] - // We don't have window title rights, or the window has no title, - // so let's use actual OSD! - } + m_wnd.SetWindowText(s.c_str()); + } + else + { + // [TODO] + // We don't have window title rights, or the window has no title, + // so let's use actual OSD! } if(m_frameskip) diff --git a/plugins/GSdx/GSSettingsDlg.cpp b/plugins/GSdx/GSSettingsDlg.cpp index 2e19b5593d..26f7c51f06 100644 --- a/plugins/GSdx/GSSettingsDlg.cpp +++ b/plugins/GSdx/GSSettingsDlg.cpp @@ -71,8 +71,9 @@ GSSetting GSSettingsDlg::g_upscale_multiplier[] = {4, "4x", NULL}, }; -GSSettingsDlg::GSSettingsDlg() - : GSDialog(IDD_CONFIG) +GSSettingsDlg::GSSettingsDlg( bool isOpen2 ) + : GSDialog(isOpen2 ? IDD_CONFIG2 : IDD_CONFIG) + , m_IsOpen2(isOpen2) { } @@ -82,6 +83,7 @@ void GSSettingsDlg::OnInit() m_modes.clear(); + if(!m_IsOpen2) { D3DDISPLAYMODE mode; memset(&mode, 0, sizeof(mode)); diff --git a/plugins/GSdx/GSSettingsDlg.h b/plugins/GSdx/GSSettingsDlg.h index 8403b4f5b2..daeddd9d79 100644 --- a/plugins/GSdx/GSSettingsDlg.h +++ b/plugins/GSdx/GSSettingsDlg.h @@ -27,7 +27,8 @@ class GSSettingsDlg : public GSDialog { list m_modes; - + bool m_IsOpen2; + void UpdateControls(); protected: @@ -35,7 +36,7 @@ protected: bool OnCommand(HWND hWnd, UINT id, UINT code); public: - GSSettingsDlg(); + GSSettingsDlg( bool isOpen2 ); static GSSetting g_renderers[]; static GSSetting g_interlace[]; diff --git a/plugins/GSdx/GSdx.def b/plugins/GSdx/GSdx.def index fa5ccfb804..f57aac68d1 100644 --- a/plugins/GSdx/GSdx.def +++ b/plugins/GSdx/GSdx.def @@ -8,6 +8,7 @@ EXPORTS PS2EgetLibName PS2EgetLibVersion2 PS2EgetCpuPlatform + PS2EsetEmuVersion GSsetBaseMem GSinit GSshutdown diff --git a/plugins/GSdx/GSdx.rc b/plugins/GSdx/GSdx.rc index 28f625c8f0..3ddf3178fb 100644 --- a/plugins/GSdx/GSdx.rc +++ b/plugins/GSdx/GSdx.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// Hungarian resources +// English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 @@ -52,10 +52,10 @@ END // RCDATA // -IDR_CONVERT_FX RCDATA "res\\convert.fx" -IDR_TFX_FX RCDATA "res\\tfx.fx" -IDR_MERGE_FX RCDATA "res\\merge.fx" -IDR_INTERLACE_FX RCDATA "res\\interlace.fx" +IDR_CONVERT_FX RCDATA "res\\convert.fx" +IDR_TFX_FX RCDATA "res\\tfx.fx" +IDR_MERGE_FX RCDATA "res\\merge.fx" +IDR_INTERLACE_FX RCDATA "res\\interlace.fx" ///////////////////////////////////////////////////////////////////////////// // @@ -70,44 +70,44 @@ IDB_LOGO10 BITMAP "res\\logo10.bmp" // Dialog // -IDD_CONFIG DIALOGEX 0, 0, 189, 298 +IDD_CONFIG DIALOGEX 0, 0, 189, 295 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Settings..." FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN CONTROL 2022,IDC_LOGO10,"Static",SS_BITMAP,7,7,175,42 CONTROL 2021,IDC_LOGO9,"Static",SS_BITMAP,7,7,175,44 - LTEXT "Resolution:",IDC_STATIC,7,59,37,8 - COMBOBOX IDC_RESOLUTION,71,57,111,125,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Renderer:",IDC_STATIC,7,74,34,8 - COMBOBOX IDC_RENDERER,71,72,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Interlacing (F5):",IDC_STATIC,7,90,53,8 - COMBOBOX IDC_INTERLACE,71,87,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Aspect Ratio (F6):",IDC_STATIC,7,105,60,8 - COMBOBOX IDC_ASPECTRATIO,71,102,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "D3D internal res:",IDC_STATIC,7,133,55,8 - EDITTEXT IDC_RESX_EDIT,71,130,35,13,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,99,133,11,14 - EDITTEXT IDC_RESY_EDIT,109,130,35,13,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,133,133,11,14 - CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,164,33,10 - LTEXT "SW rend. threads:",IDC_STATIC,7,181,60,8 - EDITTEXT IDC_SWTHREADS_EDIT,71,179,35,13,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,99,182,11,14 - CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,7,199,67,10 - CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,200,58,10 - CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,212,82,10 - CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,213,93,10 - CONTROL "Wait VSync",IDC_VSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,226,51,10 - CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,226,93,10 - CONTROL "Edge anti-aliasing (AA1, sw-mode only)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,240,141,10 - CONTROL "Enable output merger blur effect",IDC_BLUR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,254,121,10 - DEFPUSHBUTTON "OK",IDOK,43,277,50,14 - PUSHBUTTON "Cancel",IDCANCEL,96,277,50,14 - COMBOBOX IDC_UPSCALE_MULTIPLIER,71,145,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Or use Scaling:",IDC_STATIC,7,149,49,8 - LTEXT "D3D Enhancements (can cause glitches)",IDC_STATIC,31,118,128,8 - LTEXT "Or use original PS2 resolution :",IDC_STATIC,7,164,99,8 + LTEXT "Resolution:",IDC_STATIC,7,58,37,8 + COMBOBOX IDC_RESOLUTION,71,56,111,125,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Renderer:",IDC_STATIC,7,73,34,8 + COMBOBOX IDC_RENDERER,71,71,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Interlacing (F5):",IDC_STATIC,7,89,53,8 + COMBOBOX IDC_INTERLACE,71,86,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Aspect Ratio (F6):",IDC_STATIC,7,104,60,8 + COMBOBOX IDC_ASPECTRATIO,71,101,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "D3D internal res:",IDC_STATIC,7,132,55,8 + EDITTEXT IDC_RESX_EDIT,71,129,35,13,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,99,132,11,14 + EDITTEXT IDC_RESY_EDIT,109,129,35,13,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,133,132,11,14 + CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,162,33,10 + LTEXT "SW rend. threads:",IDC_STATIC,7,178,60,8 + EDITTEXT IDC_SWTHREADS_EDIT,71,176,35,13,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,99,179,11,14 + CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,7,197,67,10 + CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,198,58,10 + CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,210,82,10 + CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,211,93,10 + CONTROL "Wait VSync",IDC_VSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,224,51,10 + CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,224,93,10 + CONTROL "Edge anti-aliasing (AA1, sw-mode only)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,238,141,10 + CONTROL "Enable output merger blur effect",IDC_BLUR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,252,121,10 + DEFPUSHBUTTON "OK",IDOK,43,275,50,14 + PUSHBUTTON "Cancel",IDCANCEL,96,275,50,14 + COMBOBOX IDC_UPSCALE_MULTIPLIER,71,144,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Or use Scaling:",IDC_STATIC,7,147,49,8 + LTEXT "D3D Enhancements (can cause glitches)",IDC_STATIC,31,117,128,8 + LTEXT "Or use original PS2 resolution :",IDC_STATIC,7,162,99,8 END IDD_CAPTURE DIALOGEX 0, 0, 279, 71 @@ -153,6 +153,40 @@ BEGIN CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,157,49,10 END +IDD_CONFIG2 DIALOGEX 0, 0, 187, 258 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Settings..." +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + CONTROL 2022,IDC_LOGO10,"Static",SS_BITMAP,6,6,173,42 + DEFPUSHBUTTON "OK",IDOK,41,239,50,14 + LTEXT "Renderer:",IDC_STATIC,6,57,34,8 + COMBOBOX IDC_RENDERER,70,55,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Interlacing (F5):",IDC_STATIC,6,73,53,8 + COMBOBOX IDC_INTERLACE,70,70,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "D3D internal res:",IDC_STATIC,6,105,55,8 + EDITTEXT IDC_RESX_EDIT,70,102,35,13,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,98,105,11,14 + EDITTEXT IDC_RESY_EDIT,108,102,35,13,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,132,105,11,14 + CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,111,135,33,10 + LTEXT "SW rend. threads:",IDC_STATIC,6,151,60,8 + EDITTEXT IDC_SWTHREADS_EDIT,70,149,35,13,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,98,152,11,14 + COMBOBOX IDC_UPSCALE_MULTIPLIER,70,117,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Or use Scaling:",IDC_STATIC,6,120,49,8 + LTEXT "D3D Enhancements (can cause glitches)",IDC_STATIC,30,90,128,8 + LTEXT "Or use original PS2 resolution :",IDC_STATIC,6,135,99,8 + CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,6,174,67,10 + CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,88,175,58,10 + CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,188,82,10 + CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,88,188,93,10 + CONTROL "Edge anti-aliasing (AA1, sw-mode only)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,202,141,10 + CONTROL "Enable output merger blur effect",IDC_BLUR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,216,121,10 + PUSHBUTTON "Cancel",IDCANCEL,95,239,50,14 + CONTROL 2021,IDC_LOGO9,"Static",SS_BITMAP,6,6,175,44 +END + ///////////////////////////////////////////////////////////////////////////// // @@ -170,7 +204,7 @@ BEGIN VERTGUIDE, 89 VERTGUIDE, 182 TOPMARGIN, 7 - BOTTOMMARGIN, 291 + BOTTOMMARGIN, 288 HORZGUIDE, 49 END @@ -191,6 +225,14 @@ BEGIN TOPMARGIN, 7 BOTTOMMARGIN, 192 END + + IDD_CONFIG2, DIALOG + BEGIN + LEFTMARGIN, 6 + RIGHTMARGIN, 181 + TOPMARGIN, 6 + BOTTOMMARGIN, 252 + END END #endif // APSTUDIO_INVOKED @@ -248,3 +290,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/plugins/GSdx/resource.h b/plugins/GSdx/resource.h index 14637d72a4..44d2a6b438 100644 --- a/plugins/GSdx/resource.h +++ b/plugins/GSdx/resource.h @@ -46,12 +46,14 @@ #define IDR_TFX_FX 10001 #define IDR_MERGE_FX 10002 #define IDR_INTERLACE_FX 10003 +#define IDD_COINFIG2 10004 +#define IDD_CONFIG2 10004 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 10004 +#define _APS_NEXT_RESOURCE_VALUE 10005 #define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_CONTROL_VALUE 2040 #define _APS_NEXT_SYMED_VALUE 5000