Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6380/src/win32 Modified Files: AboutDialog.h AccelEditor.cpp BitmapControl.h ColorButton.h ColorControl.h DirectInput.cpp Directories.cpp FileDlg.cpp GBACheats.cpp GBACheats.h GBColorDlg.cpp GBColorDlg.h GBDisassemble.h GBMapView.cpp GBMapView.h GBTileView.cpp Joypad.cpp Joypad.h MainWnd.cpp MainWndFile.cpp MainWndOptions.cpp MapView.h MemoryViewer.cpp MemoryViewer.h MemoryViewerAddressSize.h ModeConfirm.h Reg.cpp RomInfo.cpp VBA.cpp VBA.h ZoomControl.h resource.h skin.cpp skin.h skinButton.cpp stdafx.cpp stdafx.h vba.rc Log Message: vs2005 compatibility, minor changes/fixes Index: GBACheats.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBACheats.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GBACheats.h 13 May 2004 15:06:49 -0000 1.3 --- GBACheats.h 27 May 2006 14:47:33 -0000 1.4 *************** *** 21,25 **** #define AFX_GBACHEATS_H__FC31D47D_52C8_42B2_95C7_7C3FD09316A4__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_GBACHEATS_H__FC31D47D_52C8_42B2_95C7_7C3FD09316A4__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: ZoomControl.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/ZoomControl.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ZoomControl.h 13 May 2004 15:06:55 -0000 1.2 --- ZoomControl.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 21,25 **** #define AFX_ZOOMCONTROL_H__BC193230_D2D6_4240_93AE_28C2EF2C641A__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_ZOOMCONTROL_H__BC193230_D2D6_4240_93AE_28C2EF2C641A__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: MapView.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MapView.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MapView.h 13 May 2004 15:06:54 -0000 1.2 --- MapView.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 32,36 **** #include "ResizeDlg.h" #include "IUpdate.h" ! #include "..\System.h" // Added by ClassView ///////////////////////////////////////////////////////////////////////////// --- 32,36 ---- #include "ResizeDlg.h" #include "IUpdate.h" ! #include "../System.h" // Added by ClassView ///////////////////////////////////////////////////////////////////////////// Index: MemoryViewer.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MemoryViewer.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MemoryViewer.h 13 May 2004 15:06:55 -0000 1.3 --- MemoryViewer.h 27 May 2006 14:47:33 -0000 1.4 *************** *** 21,25 **** #define AFX_MEMORYVIEWER_H__52C50474_5399_4D0B_A3E4_4C52C4E0EAA0__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_MEMORYVIEWER_H__52C50474_5399_4D0B_A3E4_4C52C4E0EAA0__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: Reg.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Reg.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Reg.cpp 13 May 2004 15:06:55 -0000 1.7 --- Reg.cpp 27 May 2006 14:47:33 -0000 1.8 *************** *** 21,25 **** static char buffer[2048]; static HKEY vbKey = NULL; ! static CString regVbaPath; #define VBA_PREF "preferences" --- 21,25 ---- static char buffer[2048]; static HKEY vbKey = NULL; ! static CString *regVbaPath = NULL; #define VBA_PREF "preferences" *************** *** 39,43 **** &vbKey, &disp); ! regVbaPath.Format("%s\\vba.ini", path); } --- 39,48 ---- &vbKey, &disp); ! if( regVbaPath != NULL ) { ! delete regVbaPath; ! regVbaPath = NULL; ! } ! regVbaPath = new CString(); ! regVbaPath->Format("%s\\vba.ini", path); } *************** *** 49,53 **** const char *regGetINIPath() { ! return regVbaPath; } --- 54,58 ---- const char *regGetINIPath() { ! return *regVbaPath; } *************** *** 76,80 **** (LPTSTR)buffer, 2048, ! regVbaPath); if(res) --- 81,85 ---- (LPTSTR)buffer, 2048, ! *regVbaPath); if(res) *************** *** 107,111 **** key, def, ! regVbaPath); } --- 112,116 ---- key, def, ! *regVbaPath); } *************** *** 135,139 **** k, -1, ! regVbaPath); if(size >= 0 && size < count) count = size; --- 140,144 ---- k, -1, ! *regVbaPath); if(size >= 0 && size < count) count = size; *************** *** 142,146 **** value, count, ! regVbaPath); } --- 147,151 ---- value, count, ! *regVbaPath); } *************** *** 153,162 **** REG_SZ, (const UCHAR *)value, ! strlen(value)+1); } else { WritePrivateProfileString(VBA_PREF, key, value, ! regVbaPath); } } --- 158,167 ---- REG_SZ, (const UCHAR *)value, ! lstrlen(value)+1); } else { WritePrivateProfileString(VBA_PREF, key, value, ! *regVbaPath); } } *************** *** 176,180 **** key, buffer, ! regVbaPath); } } --- 181,185 ---- key, buffer, ! *regVbaPath); } } *************** *** 197,201 **** k, buffer, ! regVbaPath); WritePrivateProfileStruct(VBA_PREF, --- 202,206 ---- k, buffer, ! *regVbaPath); WritePrivateProfileStruct(VBA_PREF, *************** *** 203,207 **** value, count, ! regVbaPath); } } --- 208,212 ---- value, count, ! *regVbaPath); } } *************** *** 216,220 **** key, NULL, ! regVbaPath); } } --- 221,225 ---- key, NULL, ! *regVbaPath); } } *************** *** 239,243 **** REG_SZ, (const UCHAR *)type, ! strlen(type)+1); RegCloseKey(key); return true; --- 244,248 ---- REG_SZ, (const UCHAR *)type, ! lstrlen(type)+1); RegCloseKey(key); return true; *************** *** 265,269 **** REG_SZ, (const UCHAR *)desc, ! strlen(desc)+1); HKEY key2; res = RegCreateKeyEx(key, --- 270,274 ---- REG_SZ, (const UCHAR *)desc, ! lstrlen(desc)+1); HKEY key2; res = RegCreateKeyEx(key, *************** *** 282,286 **** REG_SZ, (const UCHAR *)application, ! strlen(application)+1); RegCloseKey(key2); RegCloseKey(key); --- 287,291 ---- REG_SZ, (const UCHAR *)application, ! lstrlen(application)+1); RegCloseKey(key2); RegCloseKey(key); *************** *** 319,323 **** valueName, temp, ! regVbaPath); } break; --- 324,328 ---- valueName, temp, ! *regVbaPath); } break; *************** *** 326,330 **** valueName, buffer, ! regVbaPath); break; case REG_BINARY: --- 331,335 ---- valueName, buffer, ! *regVbaPath); break; case REG_BINARY: *************** *** 338,347 **** k, temp, ! regVbaPath); WritePrivateProfileStruct(section, valueName, buffer, size, ! regVbaPath); } break; --- 343,352 ---- k, temp, ! *regVbaPath); WritePrivateProfileStruct(section, valueName, buffer, size, ! *regVbaPath); } break; Index: stdafx.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/stdafx.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** stdafx.h 13 May 2004 15:06:55 -0000 1.3 --- stdafx.h 27 May 2006 14:47:33 -0000 1.4 *************** *** 34,37 **** --- 34,44 ---- //#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + // Target for Windows 2000 + #define WINVER 0x0500 + #define _WIN32_WINNT 0x0500 + + #define STRICT + + #include <afxwin.h> #include <afxcmn.h> Index: stdafx.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/stdafx.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** stdafx.cpp 13 May 2004 15:06:55 -0000 1.2 --- stdafx.cpp 27 May 2006 14:47:33 -0000 1.3 *************** *** 17,26 **** // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! // stdafx.cpp : source file that includes just the standard includes ! // DialogSizer.pch will be the pre-compiled header ! // stdafx.obj will contain the pre-compiled type information ! ! #include "stdafx.h" ! ! // TODO: reference any additional headers you need in STDAFX.H ! // and not in this file --- 17,19 ---- // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! #include "stdafx.h" \ No newline at end of file Index: RomInfo.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/RomInfo.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RomInfo.cpp 30 Apr 2006 14:33:25 -0000 1.5 --- RomInfo.cpp 27 May 2006 14:47:33 -0000 1.6 *************** *** 549,553 **** { CDialog::OnInitDialog(); ! char buffer[13]; --- 549,553 ---- { CDialog::OnInitDialog(); ! char buffer[13]; *************** *** 570,573 **** --- 570,576 ---- sprintf(buffer, "%02x", rom[0xb4]); + if( rom[0xb4] & 0x80 ) { + strcat(buffer, " (DACS)"); + } GetDlgItem(IDC_ROM_DEVICE_TYPE)->SetWindowText(buffer); Index: GBACheats.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBACheats.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** GBACheats.cpp 18 Dec 2004 23:11:08 -0000 1.11 --- GBACheats.cpp 27 May 2006 14:47:33 -0000 1.12 *************** *** 766,770 **** LVITEM item; for(int i = 0; i < count; i++) { ! memset(&item,0, sizeof(item)); item.mask = LVIF_PARAM|LVIF_STATE; item.stateMask = LVIS_SELECTED; --- 766,770 ---- LVITEM item; for(int i = 0; i < count; i++) { ! memset(&item, 0, sizeof(item)); item.mask = LVIF_PARAM|LVIF_STATE; item.stateMask = LVIS_SELECTED; *************** *** 773,779 **** if(item.state & LVIS_SELECTED) { if(cheatsList[item.lParam].enabled) ! cheatsDisable(item.lParam); else ! cheatsEnable(item.lParam); } } --- 773,779 ---- if(item.state & LVIS_SELECTED) { if(cheatsList[item.lParam].enabled) ! cheatsDisable((int)(item.lParam & 0xFFFFFFFF)); else ! cheatsEnable((int)(item.lParam & 0xFFFFFFFF)); } } *************** *** 797,801 **** if(m_list.GetItem(&item)) { if(item.state & LVIS_SELECTED) { ! cheatsDelete(item.lParam, restoreValues); } } --- 797,801 ---- if(m_list.GetItem(&item)) { if(item.state & LVIS_SELECTED) { ! cheatsDelete((int)(item.lParam & 0xFFFFFFFF), restoreValues); } } *************** *** 839,845 **** (((l->uNewState & LVIS_STATEIMAGEMASK)>>12))) { if(m_list.GetCheck(l->iItem)) ! cheatsEnable(l->lParam); else ! cheatsDisable(l->lParam); refresh(); } --- 839,845 ---- (((l->uNewState & LVIS_STATEIMAGEMASK)>>12))) { if(m_list.GetCheck(l->iItem)) ! cheatsEnable((int)(l->lParam & 0xFFFFFFFF)); else ! cheatsDisable((int)(l->lParam & 0xFFFFFFFF)); refresh(); } Index: skin.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/skin.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** skin.h 29 Feb 2004 13:04:54 -0000 1.4 --- skin.h 27 May 2006 14:47:33 -0000 1.5 *************** *** 68,72 **** RECT m_rect; ! DWORD m_dOldStyle; RECT m_oldRect; int m_nButtons; --- 68,72 ---- RECT m_rect; ! LONG_PTR m_dOldStyle; RECT m_oldRect; int m_nButtons; Index: GBColorDlg.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBColorDlg.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GBColorDlg.h 13 May 2004 15:06:49 -0000 1.2 --- GBColorDlg.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 22,26 **** #include "ColorButton.h" // Added by ClassView ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 22,26 ---- #include "ColorButton.h" // Added by ClassView ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: ModeConfirm.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/ModeConfirm.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ModeConfirm.h 13 May 2004 15:06:55 -0000 1.2 --- ModeConfirm.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 35,39 **** public: int count; ! UINT timer; ModeConfirm(CWnd* pParent); // standard constructor --- 35,39 ---- public: int count; ! UINT_PTR timer; ModeConfirm(CWnd* pParent); // standard constructor Index: Directories.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Directories.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Directories.cpp 26 May 2006 14:38:47 -0000 1.3 --- Directories.cpp 27 May 2006 14:47:33 -0000 1.4 *************** *** 248,250 **** } return res; ! } \ No newline at end of file --- 248,250 ---- } return res; ! } Index: MainWnd.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWnd.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** MainWnd.cpp 30 Apr 2006 14:32:39 -0000 1.18 --- MainWnd.cpp 27 May 2006 14:47:33 -0000 1.19 *************** *** 484,487 **** --- 484,490 ---- if(!gbLoadRom(theApp.szFile)) return false; + + gbGetHardwareType(); + // used for the handling of the gb Boot Rom if (gbHardware & 5) *************** *** 496,506 **** strcat(tempName, "\\DMG_ROM.bin"); - skipBios = theApp.skipBiosFile ? true : false; gbCPUInit(tempName, theApp.useBiosFile ? true : false); } ! gbReset(); theApp.emulator = GBSystem; gbBorderOn = theApp.winGbBorderOn; --- 499,509 ---- strcat(tempName, "\\DMG_ROM.bin"); skipBios = theApp.skipBiosFile ? true : false; gbCPUInit(tempName, theApp.useBiosFile ? true : false); } ! + gbReset(); theApp.emulator = GBSystem; gbBorderOn = theApp.winGbBorderOn; *************** *** 953,957 **** if(!GetMenuItemInfo(theApp.menu, i, MF_BYPOSITION, &info)) { } ! if(!AppendMenu(theApp.popup, MF_POPUP|MF_STRING, (UINT)info.hSubMenu, buffer)) { } } --- 956,960 ---- if(!GetMenuItemInfo(theApp.menu, i, MF_BYPOSITION, &info)) { } ! if(!AppendMenu(theApp.popup, MF_POPUP|MF_STRING, (UINT_PTR)info.hSubMenu, buffer)) { } } *************** *** 967,971 **** if(!GetMenuItemInfoW(theApp.menu, i, MF_BYPOSITION, &info)) { } ! if(!AppendMenuW(theApp.popup, MF_POPUP|MF_STRING, (UINT)info.hSubMenu, buffer)) { } } --- 970,974 ---- if(!GetMenuItemInfoW(theApp.menu, i, MF_BYPOSITION, &info)) { } ! if(!AppendMenuW(theApp.popup, MF_POPUP|MF_STRING, (UINT_PTR)info.hSubMenu, buffer)) { } } Index: GBMapView.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBMapView.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** GBMapView.cpp 13 May 2004 15:06:49 -0000 1.6 --- GBMapView.cpp 27 May 2006 14:47:33 -0000 1.7 *************** *** 500,505 **** mapViewZoom.setColors(colors); ! int x = wParam & 0xffff; ! int y = (wParam >> 16); CString buffer; --- 500,505 ---- mapViewZoom.setColors(colors); ! int x = (int)(wParam & 0xffff); ! int y = wParam >> 16; CString buffer; Index: AccelEditor.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/AccelEditor.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AccelEditor.cpp 13 May 2006 16:32:16 -0000 1.4 --- AccelEditor.cpp 27 May 2006 14:47:33 -0000 1.5 *************** *** 157,161 **** index = m_currents.AddString(szBuffer); // and a pointer to the accel object. ! m_currents.SetItemData(index, (DWORD)pAccel); } } --- 157,161 ---- index = m_currents.AddString(szBuffer); // and a pointer to the accel object. ! m_currents.SetItemData(index, (DWORD_PTR)pAccel); } } *************** *** 236,240 **** index = m_currents.AddString(szBuffer); ! m_currents.SetItemData(index, (DWORD)pAccel); // Reset the key editor. --- 236,240 ---- index = m_currents.AddString(szBuffer); ! m_currents.SetItemData(index, (DWORD_PTR)pAccel); // Reset the key editor. Index: Joypad.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Joypad.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Joypad.h 13 May 2004 15:06:50 -0000 1.2 --- Joypad.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 42,50 **** public: - // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(JoypadEditControl) - //}}AFX_VIRTUAL - // Implementation public: --- 42,45 ---- *************** *** 53,62 **** virtual ~JoypadEditControl(); - // Generated message map functions - protected: - //{{AFX_MSG(JoypadEditControl) - afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() }; --- 48,51 ---- *************** *** 103,107 **** // Implementation protected: ! UINT timerId; int which; --- 92,96 ---- // Implementation protected: ! UINT_PTR timerId; int which; *************** *** 110,114 **** afx_msg void OnCancel(); afx_msg void OnOk(); - afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnDestroy(); afx_msg void OnTimer(UINT nIDEvent); --- 99,102 ---- *************** *** 150,165 **** // Generated message map functions - //{{AFX_MSG(MotionConfig) afx_msg void OnCancel(); afx_msg void OnOk(); - afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnDestroy(); virtual BOOL OnInitDialog(); afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnTimer(UINT nIDEvent); - //}}AFX_MSG DECLARE_MESSAGE_MAP() private: ! UINT timerId; }; //{{AFX_INSERT_LOCATION}} --- 138,150 ---- // Generated message map functions afx_msg void OnCancel(); afx_msg void OnOk(); afx_msg void OnDestroy(); virtual BOOL OnInitDialog(); afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnTimer(UINT nIDEvent); DECLARE_MESSAGE_MAP() private: ! UINT_PTR timerId; }; //{{AFX_INSERT_LOCATION}} Index: GBMapView.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBMapView.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GBMapView.h 13 May 2004 15:06:49 -0000 1.2 --- GBMapView.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 32,36 **** #include "ResizeDlg.h" #include "IUpdate.h" ! #include "..\System.h" // Added by ClassView ///////////////////////////////////////////////////////////////////////////// --- 32,36 ---- #include "ResizeDlg.h" #include "IUpdate.h" ! #include "../System.h" // Added by ClassView ///////////////////////////////////////////////////////////////////////////// Index: AboutDialog.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/AboutDialog.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AboutDialog.h 26 May 2006 14:37:41 -0000 1.3 --- AboutDialog.h 27 May 2006 14:47:33 -0000 1.4 *************** *** 61,65 **** //{{AFX_MSG(AboutDialog) virtual BOOL OnInitDialog(); - // virtual void OnOK(); //}}AFX_MSG --- 61,64 ---- Index: GBDisassemble.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GBDisassemble.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GBDisassemble.h 13 May 2004 15:06:49 -0000 1.2 --- GBDisassemble.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 21,25 **** #define AFX_GBDISASSEMBLE_H__3EFD5B47_6DBF_4F63_8F91_A9511EC590EB__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_GBDISASSEMBLE_H__3EFD5B47_6DBF_4F63_8F91_A9511EC590EB__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: FileDlg.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/FileDlg.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FileDlg.cpp 25 Jun 2005 06:23:31 -0000 1.6 --- FileDlg.cpp 27 May 2006 14:47:33 -0000 1.7 *************** *** 160,164 **** ASSERT(typeControl != NULL); ! int sel = ::SendMessage(typeControl, CB_GETCURSEL, 0, 0); ASSERT(sel != -1); --- 160,164 ---- ASSERT(typeControl != NULL); ! LRESULT sel = ::SendMessage(typeControl, CB_GETCURSEL, 0, 0); ASSERT(sel != -1); Index: MemoryViewerAddressSize.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MemoryViewerAddressSize.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MemoryViewerAddressSize.h 13 May 2004 15:06:55 -0000 1.2 --- MemoryViewerAddressSize.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 21,25 **** #define AFX_MEMORYVIEWERADDRESSSIZE_H__04605262_2B1D_4EED_A467_B6C56AC2CACD__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_MEMORYVIEWERADDRESSSIZE_H__04605262_2B1D_4EED_A467_B6C56AC2CACD__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: vba.rc =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/vba.rc,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** vba.rc 26 May 2006 14:37:41 -0000 1.54 --- vba.rc 27 May 2006 14:47:33 -0000 1.55 *************** *** 14,71 **** ///////////////////////////////////////////////////////////////////////////// - // German (Germany) resources - - #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU) - #ifdef _WIN32 - LANGUAGE LANG_GERMAN, SUBLANG_GERMAN - #pragma code_page(1252) - #endif //_WIN32 - - ///////////////////////////////////////////////////////////////////////////// - // - // Version - // - - VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,8,0,600 - PRODUCTVERSION 1,8,0,600 - FILEFLAGSMASK 0x3fL - #ifdef _DEBUG - FILEFLAGS 0x29L - #else - FILEFLAGS 0x28L - #endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L - BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "VisualBoyAdvance comes with NO WARRANTY. Use it at your own risk." - VALUE "CompanyName", "http://vba.ngemu.com/" - VALUE "FileDescription", "VisualBoyAdvance emulator" - VALUE "FileVersion", "1, 8, 0, 600" - VALUE "InternalName", "VisualBoyAdvance" - VALUE "LegalCopyright", "Copyright © 2006 VBA development team" - VALUE "OriginalFilename", "VisualBoyAdvance.exe" - VALUE "PrivateBuild", "0" - VALUE "ProductName", "VisualBoyAdvance emulator" - VALUE "ProductVersion", "1, 8, 0, 600" - VALUE "SpecialBuild", "0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END - END - - #endif // German (Germany) resources - ///////////////////////////////////////////////////////////////////////////// - - - ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources --- 14,17 ---- *************** *** 131,135 **** FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN ! ICON "IDI_ICON",IDC_STATIC,6,6,21,20 CTEXT "VisualBoyAdvance Emulator",IDC_STATIC,30,6,120,8 CTEXT "Copyright © 2006 VBA development team",IDC_STATIC,6,36,144,8 --- 77,81 ---- FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN ! ICON 101,IDC_STATIC,6,6,20,20 CTEXT "VisualBoyAdvance Emulator",IDC_STATIC,30,6,120,8 CTEXT "Copyright © 2006 VBA development team",IDC_STATIC,6,36,144,8 Index: resource.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/resource.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** resource.h 26 May 2006 14:37:41 -0000 1.42 --- resource.h 27 May 2006 14:47:33 -0000 1.43 *************** *** 45,48 **** --- 45,49 ---- #define IDS_CBA_CODE_WARNING 40 #define IDS_OUT_OF_MEMORY 41 + #define IDI_ICON 101 #define IDD_REGISTERS 102 #define IDD_DEBUG 103 *************** *** 757,761 **** #define _APS_NEXT_COMMAND_VALUE 40278 #define _APS_NEXT_CONTROL_VALUE 1256 ! #define _APS_NEXT_SYMED_VALUE 104 #endif #endif --- 758,762 ---- #define _APS_NEXT_COMMAND_VALUE 40278 #define _APS_NEXT_CONTROL_VALUE 1256 ! #define _APS_NEXT_SYMED_VALUE 105 #endif #endif Index: ColorButton.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/ColorButton.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ColorButton.h 13 May 2004 15:06:49 -0000 1.2 --- ColorButton.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 21,25 **** #define AFX_COLORBUTTON_H__DF02109B_B91C_49FD_954F_74A48B83C314__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_COLORBUTTON_H__DF02109B_B91C_49FD_954F_74A48B83C314__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: BitmapControl.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/BitmapControl.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BitmapControl.h 13 May 2004 15:06:49 -0000 1.2 --- BitmapControl.h 27 May 2006 14:47:33 -0000 1.3 *************** *** 21,25 **** #define AFX_BITMAPCONTROL_H__2434AADB_B6A5_4E43_AA16_7B65B6F7FA26__INCLUDED_ ! #include "..\System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once --- 21,25 ---- #define AFX_BITMAPCONTROL_H__2434AADB_B6A5_4E43_AA16_7B65B6F7FA26__INCLUDED_ ! #include "../System.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once Index: VBA.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/VBA.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** VBA.cpp 13 May 2006 16:32:16 -0000 1.14 --- VBA.cpp 27 May 2006 14:47:33 -0000 1.15 *************** *** 21,25 **** #include "stdafx.h" #include <mmsystem.h> - #include <windows.h> #include "AVIWrite.h" --- 21,24 ---- *************** *** 165,171 **** --- 164,172 ---- filterWidth = 0; filterHeight = 0; + fsAdapter = 0; fsWidth = 0; fsHeight = 0; fsColorDepth = 0; + fsFrequency = 0; fsForceChange = false; surfaceSizeX = 0; *************** *** 225,228 **** --- 226,230 ---- ddrawUseVideoMemory = false; d3dFilter = 0; + d3dKeepAspectRatio = true; glFilter = 0; glType = 0; *************** *** 290,293 **** --- 292,304 ---- InterframeCleanup(); + char winBuffer[2048]; + + GetModuleFileName(NULL, winBuffer, 2048); + char *p = strrchr(winBuffer, '\\'); + if(p) + *p = 0; + + regInit(winBuffer); + saveSettings(); *************** *** 509,512 **** --- 520,524 ---- } + void VBA::adjustDestRect() { *************** *** 575,578 **** --- 587,591 ---- } + void VBA::updateIFB() { *************** *** 1207,1213 **** --- 1220,1228 ---- pVideoDriverGUID = &videoDriverGUID; + fsAdapter = regQueryDwordValue("fsAdapter", 0); fsWidth = regQueryDwordValue("fsWidth", 0); fsHeight = regQueryDwordValue("fsHeight", 0); fsColorDepth = regQueryDwordValue("fsColorDepth", 0); + fsFrequency = regQueryDwordValue("fsFrequency", 0); if(videoOption == VIDEO_OTHER) { *************** *** 1266,1269 **** --- 1281,1285 ---- if(d3dFilter < 0 || d3dFilter > 1) d3dFilter = 0; + d3dKeepAspectRatio = regQueryDwordValue("d3dKeepAspectRatio", true) ? true : false; glFilter = regQueryDwordValue("glFilter", 0); if(glFilter < 0 || glFilter > 1) *************** *** 1322,1326 **** ifbType = 0; ! winFlashSize = regQueryDwordValue("flashSize", 0x10000); if(winFlashSize != 0x10000 && winFlashSize != 0x20000) winFlashSize = 0x10000; --- 1338,1342 ---- ifbType = 0; ! flashSize = winFlashSize = regQueryDwordValue("flashSize", 0x10000); if(winFlashSize != 0x10000 && winFlashSize != 0x20000) winFlashSize = 0x10000; *************** *** 1682,1705 **** bool VBA::updateRenderMethod(bool force) { ! bool res = updateRenderMethod0(force); ! ! while(!res && renderMethod > 0) { ! if(renderMethod == OPENGL) ! renderMethod = DIRECT_3D; ! else if(renderMethod == DIRECT_3D) ! renderMethod = DIRECT_DRAW; ! else if(renderMethod == DIRECT_DRAW) { ! if(videoOption > VIDEO_4X) { ! videoOption = VIDEO_2X; ! force = true; ! } else ! renderMethod = GDI; ! } ! ! res = updateRenderMethod(force); ! } ! return res; } bool VBA::updateRenderMethod0(bool force) { --- 1698,1731 ---- bool VBA::updateRenderMethod(bool force) { ! bool res = updateRenderMethod0(force); ! ! while(!res && renderMethod > 0) { ! if( fsAdapter > 0 ) { ! fsAdapter = 0; ! } else { ! if( videoOption > VIDEO_4X ) { ! videoOption = VIDEO_1X; ! force = true; ! } else { ! if(renderMethod == OPENGL) { ! renderMethod = DIRECT_3D; ! } else { ! if(renderMethod == DIRECT_3D) { ! renderMethod = DIRECT_DRAW; ! } else { ! if(renderMethod == DIRECT_DRAW) { ! renderMethod = GDI; ! } ! } ! } ! } ! } ! res = updateRenderMethod(force); ! } ! ! return res; } + bool VBA::updateRenderMethod0(bool force) { *************** *** 1733,1747 **** switch(renderMethod) { case GDI: ! display = newGDIDisplay(); ! break; case DIRECT_DRAW: ! display = newDirectDrawDisplay(); ! break; case DIRECT_3D: ! display = newDirect3DDisplay(); ! break; ! case OPENGL: ! display = newOpenGLDisplay(); ! break; } --- 1759,1775 ---- switch(renderMethod) { case GDI: ! display = newGDIDisplay(); ! break; case DIRECT_DRAW: ! pVideoDriverGUID = NULL; ! ZeroMemory( &videoDriverGUID, sizeof( GUID ) ); ! display = newDirectDrawDisplay(); ! break; case DIRECT_3D: ! display = newDirect3DDisplay(); ! break; ! case OPENGL: ! display = newOpenGLDisplay(); ! break; } *************** *** 1774,1785 **** } void VBA::winCheckFullscreen() { ! if(videoOption > VIDEO_4X && tripleBuffering) { ! if(display) ! display->checkFullScreen(); ! } } void VBA::shutdownDisplay() { --- 1802,1816 ---- } + void VBA::winCheckFullscreen() { ! if(videoOption > VIDEO_4X && tripleBuffering) { ! if(display) { ! display->checkFullScreen(); ! } ! } } + void VBA::shutdownDisplay() { *************** *** 2099,2105 **** --- 2130,2138 ---- + regSetDwordValue("fsAdapter", fsAdapter); regSetDwordValue("fsWidth", fsWidth); regSetDwordValue("fsHeight", fsHeight); regSetDwordValue("fsColorDepth", fsColorDepth); + regSetDwordValue("fsFrequency", fsFrequency); regSetDwordValue("renderMethod", renderMethod); *************** *** 2134,2137 **** --- 2167,2171 ---- regSetDwordValue("d3dFilter", d3dFilter); + regSetDwordValue("d3dKeepAspectRatio", d3dKeepAspectRatio); regSetDwordValue("glFilter", glFilter); regSetDwordValue("glType", glType); Index: skinButton.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/skinButton.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** skinButton.cpp 13 May 2004 15:06:55 -0000 1.7 --- skinButton.cpp 27 May 2006 14:47:33 -0000 1.8 *************** *** 98,102 **** HDC hDC = ::BeginPaint(m_hWnd, &ps); HDC memDC = ::CreateCompatibleDC(hDC); ! UINT state = ::SendMessage(m_hWnd, BM_GETSTATE, 0, 0); HBITMAP oldBitmap; if(state & BST_PUSHED) --- 98,102 ---- HDC hDC = ::BeginPaint(m_hWnd, &ps); HDC memDC = ::CreateCompatibleDC(hDC); ! LRESULT state = ::SendMessage(m_hWnd, BM_GETSTATE, 0, 0); HBITMAP oldBitmap; if(state & BST_PUSHED) Index: DirectInput.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/DirectInput.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DirectInput.cpp 13 May 2006 16:32:16 -0000 1.5 --- DirectInput.cpp 27 May 2006 14:47:33 -0000 1.6 *************** *** 40,44 **** class DirectInput : public Input { private: ! HINSTANCE dinputDLL; public: --- 40,44 ---- class DirectInput : public Input { private: ! HMODULE dinputDLL; public: *************** *** 723,731 **** if(dinputDLL) { ! #ifdef _AFXDLL ! AfxFreeLibrary( dinputDLL ); ! #else ! FreeLibrary( dinputDLL ); ! #endif dinputDLL = NULL; } --- 723,727 ---- if(dinputDLL) { ! FreeLibrary(dinputDLL); dinputDLL = NULL; } *************** *** 738,747 **** 0, "VBA.ini"); ! #ifdef _AFXDLL ! dinputDLL = AfxLoadLibrary("dinput.dll"); ! #else ! dinputDLL = LoadLibrary( _T("dinput.dll") ); ! #endif ! HRESULT (WINAPI *DInputCreate)(HINSTANCE,DWORD,LPDIRECTINPUT *,IUnknown *); if(dinputDLL != NULL) { --- 734,738 ---- 0, "VBA.ini"); ! dinputDLL = LoadLibrary("dinput.dll"); HRESULT (WINAPI *DInputCreate)(HINSTANCE,DWORD,LPDIRECTINPUT *,IUnknown *); if(dinputDLL != NULL) { *************** *** 754,758 **** } } else { ! directXMessage("DINPUT.DLL"); return false; } --- 745,749 ---- } } else { ! directXMessage("dinput.dll"); return false; } Index: MainWndFile.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndFile.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** MainWndFile.cpp 13 May 2006 16:32:16 -0000 1.13 --- MainWndFile.cpp 27 May 2006 14:47:33 -0000 1.14 *************** *** 690,694 **** fseek(f, 0x1e, SEEK_SET); fread(&len, 1, 4, f); ! int game = 0; if(len > 1) { GSACodeSelect dlg(f); --- 690,694 ---- fseek(f, 0x1e, SEEK_SET); fread(&len, 1, 4, f); ! INT_PTR game = 0; if(len > 1) { GSACodeSelect dlg(f); *************** *** 738,742 **** CFileStatus status; CString str; ! __time64_t time = -1; int found = 0; --- 738,742 ---- CFileStatus status; CString str; ! __time64_t time = (__time64_t)-1; int found = 0; *************** *** 745,749 **** if(emulating && CFile::GetStatus(name, status)) { ! if((unsigned long)status.m_mtime.GetTime() < time) { time = status.m_mtime.GetTime(); found = i; --- 745,749 ---- if(emulating && CFile::GetStatus(name, status)) { ! if(status.m_mtime.GetTime() < time) { time = status.m_mtime.GetTime(); found = i; Index: Joypad.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Joypad.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Joypad.cpp 13 May 2006 16:32:16 -0000 1.5 --- Joypad.cpp 27 May 2006 14:47:33 -0000 1.6 *************** *** 47,53 **** BEGIN_MESSAGE_MAP(JoypadEditControl, CEdit) - //{{AFX_MSG_MAP(JoypadEditControl) - ON_WM_CHAR() - //}}AFX_MSG_MAP ON_MESSAGE(JOYCONFIG_MESSAGE, OnJoyConfig) END_MESSAGE_MAP() --- 47,50 ---- *************** *** 56,71 **** // JoypadEditControl message handlers - void JoypadEditControl::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) - { - } - LRESULT JoypadEditControl::OnJoyConfig(WPARAM wParam, LPARAM lParam) { ! SetWindowLong(GetSafeHwnd(), GWL_USERDATA,((wParam<<8)|lParam)); ! SetWindowText(theApp.input->getKeyName((wParam<<8)|lParam)); ! GetParent()->GetNextDlgTabItem(this, FALSE)->SetFocus(); ! return TRUE; } BOOL JoypadEditControl::PreTranslateMessage(MSG *pMsg) { --- 53,69 ---- // JoypadEditControl message handlers LRESULT JoypadEditControl::OnJoyConfig(WPARAM wParam, LPARAM lParam) { ! #ifdef _WIN64 ! SetWindowLongPtr( GetSafeHwnd(), GWL_USERDATA, ((wParam<<8)|lParam) ); ! #elif defined _WIN32 ! SetWindowLongPtr( GetSafeHwnd(), GWL_USERDATA, PtrToLong((wParam<<8)|lParam) ); ! #endif ! this->SetWindowText( theApp.input->getKeyName( (int)((wParam<<8)|lParam) ) ); ! GetParent()->GetNextDlgTabItem(this, FALSE)->SetFocus(); ! return TRUE; } + BOOL JoypadEditControl::PreTranslateMessage(MSG *pMsg) { *************** *** 113,124 **** BEGIN_MESSAGE_MAP(JoypadConfig, CDialog) - //{{AFX_MSG_MAP(JoypadConfig) ON_BN_CLICKED(ID_CANCEL, OnCancel) ON_BN_CLICKED(ID_OK, OnOk) - ON_WM_CHAR() ON_WM_DESTROY() ON_WM_TIMER() ON_WM_KEYDOWN() - //}}AFX_MSG_MAP END_MESSAGE_MAP() --- 111,119 ---- *************** *** 138,145 **** } - void JoypadConfig::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) - { - } - void JoypadConfig::OnDestroy() { --- 133,136 ---- *************** *** 166,206 **** timerId = SetTimer(0,50,NULL); ! SetWindowLong(up, GWL_USERDATA,joypad[which][KEY_UP]); up.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_UP])); ! SetWindowLong(down, GWL_USERDATA,joypad[which][KEY_DOWN]); down.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_DOWN])); ! SetWindowLong(left, GWL_USERDATA,joypad[which][KEY_LEFT]); left.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_LEFT])); ! SetWindowLong(right, GWL_USERDATA,joypad[which][KEY_RIGHT]); right.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_RIGHT])); ! SetWindowLong(buttonA, GWL_USERDATA,joypad[which][KEY_BUTTON_A]); buttonA.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_A])); ! SetWindowLong(buttonB, GWL_USERDATA,joypad[which][KEY_BUTTON_B]); buttonB.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_B])); ! SetWindowLong(buttonL, GWL_USERDATA,joypad[which][KEY_BUTTON_L]); buttonL.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_L])); ! SetWindowLong(buttonR, GWL_USERDATA,joypad[which][KEY_BUTTON_R]); buttonR.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_R])); ! SetWindowLong(buttonSelect, GWL_USERDATA,joypad[which][KEY_BUTTON_SELECT]); buttonSelect.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_SELECT])); ! SetWindowLong(buttonStart, GWL_USERDATA,joypad[which][KEY_BUTTON_START]); buttonStart.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_START])); ! SetWindowLong(speed, GWL_USERDATA,joypad[which][KEY_BUTTON_SPEED]); speed.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_SPEED])); ! SetWindowLong(capture, GWL_USERDATA,joypad[which][KEY_BUTTON_CAPTURE]); capture.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_CAPTURE])); ! SetWindowLong(buttonGS, GWL_USERDATA,joypad[which][KEY_BUTTON_GS]); buttonGS.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_GS])); --- 157,197 ---- timerId = SetTimer(0,50,NULL); ! SetWindowLongPtr(up, GWL_USERDATA,joypad[which][KEY_UP]); up.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_UP])); ! SetWindowLongPtr(down, GWL_USERDATA,joypad[which][KEY_DOWN]); down.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_DOWN])); ! SetWindowLongPtr(left, GWL_USERDATA,joypad[which][KEY_LEFT]); left.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_LEFT])); ! SetWindowLongPtr(right, GWL_USERDATA,joypad[which][KEY_RIGHT]); right.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_RIGHT])); ! SetWindowLongPtr(buttonA, GWL_USERDATA,joypad[which][KEY_BUTTON_A]); buttonA.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_A])); ! SetWindowLongPtr(buttonB, GWL_USERDATA,joypad[which][KEY_BUTTON_B]); buttonB.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_B])); ! SetWindowLongPtr(buttonL, GWL_USERDATA,joypad[which][KEY_BUTTON_L]); buttonL.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_L])); ! SetWindowLongPtr(buttonR, GWL_USERDATA,joypad[which][KEY_BUTTON_R]); buttonR.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_R])); ! SetWindowLongPtr(buttonSelect, GWL_USERDATA,joypad[which][KEY_BUTTON_SELECT]); buttonSelect.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_SELECT])); ! SetWindowLongPtr(buttonStart, GWL_USERDATA,joypad[which][KEY_BUTTON_START]); buttonStart.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_START])); ! SetWindowLongPtr(speed, GWL_USERDATA,joypad[which][KEY_BUTTON_SPEED]); speed.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_SPEED])); ! SetWindowLongPtr(capture, GWL_USERDATA,joypad[which][KEY_BUTTON_CAPTURE]); capture.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_CAPTURE])); ! SetWindowLongPtr(buttonGS, GWL_USERDATA,joypad[which][KEY_BUTTON_GS]); buttonGS.SetWindowText(theApp.input->getKeyName(joypad[which][KEY_BUTTON_GS])); *************** *** 261,301 **** id = IDC_EDIT_UP; ! assignKey(id, GetWindowLong(up, GWL_USERDATA)); id = IDC_EDIT_DOWN; ! assignKey(id, GetWindowLong(down, GWL_USERDATA)); id = IDC_EDIT_LEFT; ! assignKey(id, GetWindowLong(left, GWL_USERDATA)); id = IDC_EDIT_RIGHT; ! assignKey(id, GetWindowLong(right, GWL_USERDATA)); id = IDC_EDIT_BUTTON_A; ! assignKey(id, GetWindowLong(buttonA, GWL_USERDATA)); id = IDC_EDIT_BUTTON_B; ! assignKey(id, GetWindowLong(buttonB, GWL_USERDATA)); id = IDC_EDIT_BUTTON_L; ! assignKey(id, GetWindowLong(buttonL, GWL_USERDATA)); id = IDC_EDIT_BUTTON_R; ! assignKey(id, GetWindowLong(buttonR, GWL_USERDATA)); id = IDC_EDIT_BUTTON_SELECT; ! assignKey(id, GetWindowLong(buttonSelect, GWL_USERDATA)); id = IDC_EDIT_BUTTON_START; ! assignKey(id, GetWindowLong(buttonStart, GWL_USERDATA)); id = IDC_EDIT_SPEED; ! assignKey(id, GetWindowLong(speed, GWL_USERDATA)); id = IDC_EDIT_CAPTURE; ! assignKey(id, GetWindowLong(capture, GWL_USERDATA)); id = IDC_EDIT_BUTTON_GS; ! assignKey(id, GetWindowLong(buttonGS, GWL_USERDATA)); // winSaveKeys(); --- 252,292 ---- id = IDC_EDIT_UP; ! assignKey(id, GetWindowLongPtr(up, GWL_USERDATA)); id = IDC_EDIT_DOWN; ! assignKey(id, GetWindowLongPtr(down, GWL_USERDATA)); id = IDC_EDIT_LEFT; ! assignKey(id, GetWindowLongPtr(left, GWL_USERDATA)); id = IDC_EDIT_RIGHT; ! assignKey(id, GetWindowLongPtr(right, GWL_USERDATA)); id = IDC_EDIT_BUTTON_A; ! assignKey(id, GetWindowLongPtr(buttonA, GWL_USERDATA)); id = IDC_EDIT_BUTTON_B; ! assignKey(id, GetWindowLongPtr(buttonB, GWL_USERDATA)); id = IDC_EDIT_BUTTON_L; ! assignKey(id, GetWindowLongPtr(buttonL, GWL_USERDATA)); id = IDC_EDIT_BUTTON_R; ! assignKey(id, GetWindowLongPtr(buttonR, GWL_USERDATA)); id = IDC_EDIT_BUTTON_SELECT; ! assignKey(id, GetWindowLongPtr(buttonSelect, GWL_USERDATA)); id = IDC_EDIT_BUTTON_START; ! assignKey(id, GetWindowLongPtr(buttonStart, GWL_USERDATA)); id = IDC_EDIT_SPEED; ! assignKey(id, GetWindowLongPtr(speed, GWL_USERDATA)); id = IDC_EDIT_CAPTURE; ! assignKey(id, GetWindowLongPtr(capture, GWL_USERDATA)); id = IDC_EDIT_BUTTON_GS; ! assignKey(id, GetWindowLongPtr(buttonGS, GWL_USERDATA)); // winSaveKeys(); *************** *** 329,340 **** BEGIN_MESSAGE_MAP(MotionConfig, CDialog) - //{{AFX_MSG_MAP(MotionConfig) ON_BN_CLICKED(ID_CANCEL, OnCancel) ON_BN_CLICKED(ID_OK, OnOk) - ON_WM_CHAR() ON_WM_DESTROY() ON_WM_KEYDOWN() ON_WM_TIMER() - //}}AFX_MSG_MAP END_MESSAGE_MAP() --- 320,328 ---- *************** *** 354,361 **** } - void MotionConfig::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) - { - } - void MotionConfig::OnDestroy() { --- 342,345 ---- *************** *** 371,384 **** timerId = SetTimer(0,200,NULL); ! SetWindowLong(up, GWL_USERDATA,motion[KEY_UP]); up.SetWindowText(theApp.input->getKeyName(motion[KEY_UP])); ! SetWindowLong(down, GWL_USERDATA,motion[KEY_DOWN]); down.SetWindowText(theApp.input->getKeyName(motion[KEY_DOWN])); ! SetWindowLong(left, GWL_USERDATA,motion[KEY_LEFT]); left.SetWindowText(theApp.input->getKeyName(motion[KEY_LEFT])); ! SetWindowLong(right, GWL_USERDATA,motion[KEY_RIGHT]); right.SetWindowText(theApp.input->getKeyName(motion[KEY_RIGHT])); --- 355,368 ---- timerId = SetTimer(0,200,NULL); ! SetWindowLongPtr(up, GWL_USERDATA,motion[KEY_UP]); up.SetWindowText(theApp.input->getKeyName(motion[KEY_UP])); ! SetWindowLongPtr(down, GWL_USERDATA,motion[KEY_DOWN]); down.SetWindowText(theApp.input->getKeyName(motion[KEY_DOWN])); ! SetWindowLongPtr(left, GWL_USERDATA,motion[KEY_LEFT]); left.SetWindowText(theApp.input->getKeyName(motion[KEY_LEFT])); ! SetWindowLongPtr(right, GWL_USERDATA,motion[KEY_RIGHT]); right.SetWindowText(theApp.input->getKeyName(motion[KEY_RIGHT])); *************** *** 423,435 **** id = IDC_EDIT_UP; ! assignKey(id, GetWindowLong(up, GWL_USERDATA)); id = IDC_EDIT_DOWN; ! assignKey(id, GetWindowLong(down, GWL_USERDATA)); id = IDC_EDIT_LEFT; ! assignKey(id, GetWindowLong(left, GWL_USERDATA)); id = IDC_EDIT_RIGHT; ! assignKey(id, GetWindowLong(right, GWL_USERDATA)); } --- 407,419 ---- id = IDC_EDIT_UP; ! assignKey(id, GetWindowLongPtr(up, GWL_USERDATA)); id = IDC_EDIT_DOWN; ! assignKey(id, GetWindowLongPtr(down, GWL_USERDATA)); id = IDC_EDIT_LEFT; ! assignKey(id, GetWindowLongPtr(left, GWL_USERDATA)); id = IDC_EDIT_RIGHT; ! assignKey(id, GetWindowLongPtr(right, GWL_USERDATA)); } Index: MemoryViewer.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MemoryViewer.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MemoryViewer.cpp 13 May 2004 15:06:54 -0000 1.7 --- MemoryViewer.cpp 27 May 2006 14:47:33 -0000 1.8 *************** *** 536,541 **** LRESULT MemoryViewer::OnWMChar(WPARAM wParam, LPARAM LPARAM) ! { ! if(OnEditInput(wParam)) return 0; return 1; --- 536,541 ---- LRESULT MemoryViewer::OnWMChar(WPARAM wParam, LPARAM LPARAM) ! { // The WM_CHAR message uses Unicode Transformation Format (UTF)-16. ! if(OnEditInput((UINT)(wParam & 0xFFFF))) return 0; return 1; Index: MainWndOptions.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndOptions.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MainWndOptions.cpp 30 Apr 2006 14:33:12 -0000 1.7 --- MainWndOptions.cpp 27 May 2006 14:47:33 -0000 1.8 *************** *** 43,46 **** --- 43,48 ---- #include "../gb/gbPrinter.h" + #include <tchar.h> + extern int emulating; *************** *** 109,120 **** } void MainWnd::OnOptionsFrameskipThrottleOther() { ! Throttle dlg; ! int v = dlg.DoModal(); ! if(v) ! theApp.throttle = v; } void MainWnd::OnUpdateOptionsFrameskipThrottleOther(CCmdUI* pCmdUI) { --- 111,126 ---- } + void MainWnd::OnOptionsFrameskipThrottleOther() { ! Throttle dlg; ! int v = (int)dlg.DoModal(); ! ! if( v ) { ! theApp.throttle = v; ! } } + void MainWnd::OnUpdateOptionsFrameskipThrottleOther(CCmdUI* pCmdUI) { *************** *** 222,230 **** } void MainWnd::OnOptionsVideoVsync() { ! theApp.vsync = !theApp.vsync; } void MainWnd::OnUpdateOptionsVideoVsync(CCmdUI* pCmdUI) { --- 228,241 ---- } + void MainWnd::OnOptionsVideoVsync() { ! theApp.vsync = !theApp.vsync; ! if( theApp.display ) { ! theApp.display->setOption( _T("vsync"), theApp.vsync ); ! } } + void MainWnd::OnUpdateOptionsVideoVsync(CCmdUI* pCmdUI) { *************** *** 270,280 **** } BOOL MainWnd::OnOptionVideoSize(UINT nID) { ! theApp.updateVideoSize(nID); ! theApp.m_pMainWnd->PostMessage(VBA_CONFIRM_MODE); ! return TRUE; } void MainWnd::OnOptionsVideoFullscreen320x240() { --- 281,293 ---- } + BOOL MainWnd::OnOptionVideoSize(UINT nID) { ! theApp.updateVideoSize(nID); ! theApp.m_pMainWnd->PostMessage(VBA_CONFIRM_MODE); ! return TRUE; } + void MainWnd::OnOptionsVideoFullscreen320x240() { *************** *** 292,295 **** --- 305,309 ---- } + void MainWnd::OnOptionsVideoFullscreen() { *************** *** 326,329 **** --- 340,344 ---- } + void MainWnd::OnUpdateOptionsVideoFullscreen(CCmdUI* pCmdUI) { *************** *** 343,354 **** } void MainWnd::OnOptionsVideoFullscreenstretchtofit() { ! theApp.fullScreenStretch = !theApp.fullScreenStretch; ! theApp.updateWindowSize(theApp.videoOption); ! if(theApp.display) ! theApp.display->clear(); } void MainWnd::OnUpdateOptionsVideoFullscreenstretchtofit(CCmdUI* pCmdUI) { --- 358,376 ---- } + void MainWnd::OnOptionsVideoFullscreenstretchtofit() { ! theApp.fullScreenStretch = !theApp.fullScreenStretch; ! theApp.d3dKeepAspectRatio = !theApp.fullScreenStretch; ! theApp.updateWindowSize( theApp.videoOption ); ! if( theApp.display ) { ! if( emulating ) { ! theApp.display->clear( ); ! } ! theApp.display->setOption( _T("d3dKeepAspectRatio"), theApp.d3dKeepAspectRatio ); ! } } + void MainWnd::OnUpdateOptionsVideoFullscreenstretchtofit(CCmdUI* pCmdUI) { *************** *** 427,445 **** } void MainWnd::OnOptionsVideoTriplebuffering() { ! theApp.tripleBuffering = !theApp.tripleBuffering; } void MainWnd::OnUpdateOptionsVideoTriplebuffering(CCmdUI* pCmdUI) { ! pCmdUI->SetCheck(theApp.tripleBuffering); } void MainWnd::OnOptionsVideoDdrawemulationonly() { ! theApp.ddrawEmulationOnly = !theApp.ddrawEmulationOnly; } void MainWnd::OnUpdateOptionsVideoDdrawemulationonly(CCmdUI* pCmdUI) { --- 449,476 ---- } + void MainWnd::OnOptionsVideoTriplebuffering() { ! theApp.tripleBuffering = !theApp.tripleBuffering; ! if( theApp.display ) { ! theApp.display->setOption( _T("tripleBuffering"), theApp.tripleBuffering ); ! } } + void MainWnd::OnUpdateOptionsVideoTriplebuffering(CCmdUI* pCmdUI) { ! pCmdUI->SetCheck(theApp.tripleBuffering); } void MainWnd::OnOptionsVideoDdrawemulationonly() { ! theApp.ddrawEmulationOnly = !theApp.ddrawEmulationOnly; ! if( theApp.display ) { ! theApp.display->setOption( _T("ddrawEmulationOnly"), theApp.ddrawEmulationOnly ); ! } } + void MainWnd::OnUpdateOptionsVideoDdrawemulationonly(CCmdUI* pCmdUI) { *************** *** 447,455 **** } void MainWnd::OnOptionsVideoDdrawusevideomemory() { ! theApp.ddrawUseVideoMemory = !theApp.ddrawUseVideoMemory; } void MainWnd::OnUpdateOptionsVideoDdrawusevideomemory(CCmdUI* pCmdUI) { --- 478,491 ---- } + void MainWnd::OnOptionsVideoDdrawusevideomemory() { ! theApp.ddrawUseVideoMemory = !theApp.ddrawUseVideoMemory; ! if( theApp.display ) { ! theApp.display->setOption( _T("ddrawUseVideoMemory"), theApp.ddrawUseVideoMemory ); ! } } + void MainWnd::OnUpdateOptionsVideoDdrawusevideomemory(CCmdUI* pCmdUI) { *************** *** 459,465 **** void MainWnd::OnOptionsVideoRenderoptionsD3dnofilter() { ! theApp.d3dFilter = 0; ! if(theApp.display) ! theApp.display->setOption("d3dFilter", 0); } --- 495,502 ---- void MainWnd::OnOptionsVideoRenderoptionsD3dnofilter() { ! theApp.d3dFilter = 0; ! if( theApp.display ) { ! theApp.display->setOption( _T("d3dFilter"), theApp.d3dFilter ); ! } } *************** *** 469,479 **** } void MainWnd::OnOptionsVideoRenderoptionsD3dbilinear() { ! theApp.d3dFilter = 1; ! if(theApp.display) ! theApp.display->setOption("d3dFilter", 1); } void MainWnd::OnUpdateOptionsVideoRenderoptionsD3dbilinear(CCmdUI* pCmdUI) { --- 506,519 ---- } + void MainWnd::OnOptionsVideoRenderoptionsD3dbilinear() { ! theApp.d3dFilter = 1; ! if( theApp.display ) { ! theApp.display->setOption( _T("d3dFilter"), theApp.d3dFilter ); ! } } + void MainWnd::OnUpdateOptionsVideoRenderoptionsD3dbilinear(CCmdUI* pCmdUI) { *************** *** 481,491 **** } void MainWnd::OnOptionsVideoRenderoptionsGlnearest() { ! theApp.glFilter = 0; ! if(theApp.display) ! theApp.display->setOption("glFilter", 0); } void MainWnd::OnUpdateOptionsVideoRenderoptionsGlnearest(CCmdUI* pCmdUI) { --- 521,534 ---- } + void MainWnd::OnOptionsVideoRenderoptionsGlnearest() { ! theApp.glFilter = 0; ! if( theApp.display ) { ! theApp.display->setOption( _T("glFilter"), theApp.glFilter ); ! } } + void MainWnd::OnUpdateOptionsVideoRenderoptionsGlnearest(CCmdUI* pCmdUI) { *************** *** 493,503 **** } void MainWnd::OnOptionsVideoRenderoptionsGlbilinear() { ! theApp.glFilter = 1; ! if(theApp.display) ! theApp.display->setOption("glFilter", 1); } void MainWnd::OnUpdateOptionsVideoRenderoptionsGlbilinear(CCmdUI* pCmdUI) { --- 536,549 ---- } + void MainWnd::OnOptionsVideoRenderoptionsGlbilinear() { ! theApp.glFilter = 1; ! if( theApp.display ) { ! theApp.display->setOption( _T("glFilter"), theApp.glFilter ); ! } } + void MainWnd::OnUpdateOptionsVideoRenderoptionsGlbilinear(CCmdUI* pCmdUI) { *************** *** 505,515 **** } void MainWnd::OnOptionsVideoRenderoptionsGltriangle() { ! theApp.glType = 0; ! if(theApp.display) ! theApp.display->setOption("glType", 0); } void MainWnd::OnUpdateOptionsVideoRenderoptionsGltriangle(CCmdUI* pCmdUI) { --- 551,564 ---- } + void MainWnd::OnOptionsVideoRenderoptionsGltriangle() { ! theApp.glType = 0; ! if( theApp.display ) { ! theApp.display->setOption( _T("glType"), theApp.glType ); ! } } + void MainWnd::OnUpdateOptionsVideoRenderoptionsGltriangle(CCmdUI* pCmdUI) { ***************... [truncated message content] |