/[pcsx2_0.9.7]/branch/debug/0.X/0.9.X/0.9.7/ramdump-lateset/plugins/PadNull/Windows/Win32.cpp
ViewVC logotype

Annotation of /branch/debug/0.X/0.9.X/0.9.7/ramdump-lateset/plugins/PadNull/Windows/Win32.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 415 - (hide annotations) (download)
Sun Feb 27 08:25:06 2011 UTC (8 years, 11 months ago) by william
File size: 2478 byte(s)
fix issues from upstream merge of r4239-r4370
1 william 415 /* PadNull
2     * Copyright (C) 2004-2010 PCSX2 Dev Team
3     *
4     * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5     * of the GNU Lesser General Public License as published by the Free Software Found-
6     * ation, either version 3 of the License, or (at your option) any later version.
7     *
8     * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9     * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10     * PURPOSE. See the GNU General Public License for more details.
11     *
12     * You should have received a copy of the GNU General Public License along with PCSX2.
13     * If not, see <http://www.gnu.org/licenses/>.
14     */
15    
16     #include <stdio.h>
17     #include <windows.h>
18     #include <windowsx.h>
19    
20    
21     #include "resource.h"
22     #include "../Pad.h"
23    
24     HINSTANCE hInst;
25    
26     void SysMessage(char *fmt, ...) {
27     va_list list;
28     char tmp[512];
29    
30     va_start(list,fmt);
31     vsprintf(tmp,fmt,list);
32     va_end(list);
33     MessageBox(0, tmp, "Pad Plugin Msg", 0);
34     }
35    
36     BOOL CALLBACK ConfigureDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) {
37    
38     switch(uMsg) {
39     case WM_INITDIALOG:
40     LoadConfig();
41     if (conf.Log) CheckDlgButton(hW, IDC_LOGGING, TRUE);
42     return TRUE;
43    
44     case WM_COMMAND:
45     switch(LOWORD(wParam)) {
46     case IDCANCEL:
47     EndDialog(hW, TRUE);
48     return TRUE;
49     case IDOK:
50     if (IsDlgButtonChecked(hW, IDC_LOGGING))
51     conf.Log = 1;
52     else
53     conf.Log = 0;
54     SaveConfig();
55     EndDialog(hW, FALSE);
56     return TRUE;
57     }
58     }
59     return FALSE;
60     }
61    
62     BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) {
63     switch(uMsg) {
64     case WM_INITDIALOG:
65     return TRUE;
66    
67     case WM_COMMAND:
68     switch(LOWORD(wParam)) {
69     case IDOK:
70     EndDialog(hW, FALSE);
71     return TRUE;
72     }
73     }
74     return FALSE;
75     }
76    
77     EXPORT_C_(void) PADconfigure() {
78     DialogBox(hInst,
79     MAKEINTRESOURCE(IDD_CONFIG),
80     GetActiveWindow(),
81     (DLGPROC)ConfigureDlgProc);
82     }
83    
84     EXPORT_C_(void) PADabout() {
85     DialogBox(hInst,
86     MAKEINTRESOURCE(IDD_ABOUT),
87     GetActiveWindow(),
88     (DLGPROC)AboutDlgProc);
89     }
90    
91     BOOL APIENTRY DllMain(HANDLE hModule, // DLL INIT
92     DWORD dwReason,
93     LPVOID lpReserved) {
94     hInst = (HINSTANCE)hModule;
95     return TRUE; // very quick :)
96     }
97    

  ViewVC Help
Powered by ViewVC 1.1.22