mirror of https://github.com/PCSX2/pcsx2.git
fwnull|usbnull: Remove unused Windows-specific stuff
This commit is contained in:
parent
278f6e5941
commit
ceb383628b
|
@ -30,14 +30,12 @@ set(FWnullLinuxHeaders
|
|||
|
||||
# FWnull Windows sources
|
||||
set(FWnullWindowsSources
|
||||
Windows/Config.cpp
|
||||
Windows/FireWireNull.def
|
||||
Windows/FireWireNul.rc
|
||||
Windows/Win32.cpp)
|
||||
)
|
||||
|
||||
# FWnull Windows headers
|
||||
set(FWnullWindowsHeaders
|
||||
Windows/resource.h)
|
||||
)
|
||||
|
||||
set(FWnullFinalSources
|
||||
${FWnullSources}
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
/* FWnull
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../FW.h"
|
||||
|
||||
extern HINSTANCE hInst;
|
||||
void SaveConfig()
|
||||
{
|
||||
|
||||
Config *Conf1 = &conf;
|
||||
char *szTemp;
|
||||
char szIniFile[256], szValue[256];
|
||||
|
||||
GetModuleFileName(GetModuleHandle((LPCSTR)hInst), szIniFile, 256);
|
||||
szTemp = strrchr(szIniFile, '\\');
|
||||
|
||||
if (!szTemp)
|
||||
return;
|
||||
strcpy(szTemp, "\\inis\\fwnull.ini");
|
||||
sprintf(szValue, "%u", Conf1->Log);
|
||||
WritePrivateProfileString("Interface", "Logging", szValue, szIniFile);
|
||||
}
|
||||
|
||||
void LoadConfig()
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
|
||||
Config *Conf1 = &conf;
|
||||
char *szTemp;
|
||||
char szIniFile[256], szValue[256];
|
||||
|
||||
GetModuleFileName(GetModuleHandle((LPCSTR)hInst), szIniFile, 256);
|
||||
szTemp = strrchr(szIniFile, '\\');
|
||||
|
||||
if (!szTemp)
|
||||
return;
|
||||
strcpy(szTemp, "\\inis\\fwnull.ini");
|
||||
fp = fopen("inis\\fwnull.ini", "rt"); //check if firewirenull.ini really exists
|
||||
if (!fp) {
|
||||
CreateDirectory("inis", NULL);
|
||||
memset(&conf, 0, sizeof(conf));
|
||||
conf.Log = 0; //default value
|
||||
SaveConfig(); //save and return
|
||||
return;
|
||||
}
|
||||
fclose(fp);
|
||||
GetPrivateProfileString("Interface", "Logging", NULL, szValue, 20, szIniFile);
|
||||
Conf1->Log = strtoul(szValue, NULL, 10);
|
||||
return;
|
||||
}
|
|
@ -1,116 +0,0 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxresmw.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Spanish (Argentina) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESS)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_ARGENTINA
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxresmw.h""\r\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_CONFIG DIALOGEX 0, 0, 212, 121
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Firewireconfigure"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,48,100,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,113,100,50,14
|
||||
CONTROL "Enable Logging (for develop use only)",IDC_LOGGING,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,187,13
|
||||
END
|
||||
|
||||
IDD_ABOUT DIALOGEX 0, 0, 177, 106
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "FireWire About"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,65,85,50,14
|
||||
LTEXT "FireWire Driver",IDC_NAME,70,10,48,8
|
||||
GROUPBOX "",IDC_STATIC,5,35,170,40
|
||||
LTEXT "Author: Shadow and linuzappz",IDC_STATIC,29,19,141,10
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_CONFIG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 205
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 114
|
||||
END
|
||||
|
||||
IDD_ABOUT, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 170
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 99
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // Spanish (Argentina) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
|
||||
RC = windres
|
||||
STRIP = strip
|
||||
|
||||
PLUGIN = FWnull.dll
|
||||
CFLAGS = -Wall -O2 -fomit-frame-pointer -I.. -D__WIN32__ -D__MINGW32__
|
||||
LIBS = -lcomctl32 -lwsock32 -lwinmm -lgdi32 -lcomdlg32
|
||||
RESOBJ = FireWireNull.o
|
||||
OBJS = ../FW.o Config.o Win32.o ${RESOBJ}
|
||||
|
||||
DEPS:= $(OBJS:.o=.d)
|
||||
|
||||
all: plugin
|
||||
|
||||
plugin: ${OBJS}
|
||||
dllwrap --def plugin.def -o ${PLUGIN} ${OBJS} ${LIBS}
|
||||
# ${CC} -shared -Wl,--kill-at,--output-def,plugin.def ${CFLAGS} ${OBJS} -o ${PLUGIN} ${LIBS}
|
||||
${STRIP} ${PLUGIN}
|
||||
|
||||
.PHONY: clear plugin
|
||||
|
||||
clean:
|
||||
rm -f ${OBJS} ${DEPS} ${PLUGIN}
|
||||
|
||||
${RESOBJ}: FireWireNull.rc
|
||||
${RC} -D__MINGW32__ -I rc -O coff -o $@ -i $<
|
||||
|
||||
-include ${DEPS}
|
||||
|
|
@ -1,103 +0,0 @@
|
|||
/* FWnull
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
|
||||
|
||||
#include "resource.h"
|
||||
#include "../FW.h"
|
||||
|
||||
HINSTANCE hInst;
|
||||
|
||||
void SysMessage(char *fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
char tmp[512];
|
||||
|
||||
va_start(list, fmt);
|
||||
vsprintf(tmp, fmt, list);
|
||||
va_end(list);
|
||||
MessageBox(GetActiveWindow(), tmp, "FW Plugin Msg", MB_SETFOREGROUND | MB_OK);
|
||||
}
|
||||
|
||||
BOOL CALLBACK ConfigureDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
||||
switch (uMsg) {
|
||||
case WM_INITDIALOG:
|
||||
LoadConfig();
|
||||
if (conf.Log)
|
||||
CheckDlgButton(hW, IDC_LOGGING, TRUE);
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam)) {
|
||||
case IDCANCEL:
|
||||
EndDialog(hW, TRUE);
|
||||
return TRUE;
|
||||
case IDOK:
|
||||
if (IsDlgButtonChecked(hW, IDC_LOGGING))
|
||||
conf.Log = 1;
|
||||
else
|
||||
conf.Log = 0;
|
||||
SaveConfig();
|
||||
EndDialog(hW, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg) {
|
||||
case WM_INITDIALOG:
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam)) {
|
||||
case IDOK:
|
||||
EndDialog(hW, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void CALLBACK FWconfigure()
|
||||
{
|
||||
DialogBox(hInst,
|
||||
MAKEINTRESOURCE(IDD_CONFIG),
|
||||
GetActiveWindow(),
|
||||
(DLGPROC)ConfigureDlgProc);
|
||||
}
|
||||
|
||||
void CALLBACK FWabout()
|
||||
{
|
||||
DialogBox(hInst,
|
||||
MAKEINTRESOURCE(IDD_ABOUT),
|
||||
GetActiveWindow(),
|
||||
(DLGPROC)AboutDlgProc);
|
||||
}
|
||||
|
||||
BOOL APIENTRY DllMain(HANDLE hModule, // DLL INIT
|
||||
DWORD dwReason,
|
||||
LPVOID lpReserved)
|
||||
{
|
||||
hInst = (HINSTANCE)hModule;
|
||||
return TRUE; // very quick :)
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by FireWireNull.rc
|
||||
//
|
||||
#define IDD_CONFDLG 101
|
||||
#define IDD_CONFIG 101
|
||||
#define IDD_ABOUT 103
|
||||
#define IDC_NAME 1000
|
||||
#define IDC_CHECK1 1007
|
||||
#define IDC_LOGGING 1007
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 105
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1008
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
|
@ -30,14 +30,12 @@ set(USBnullLinuxHeaders
|
|||
|
||||
# USBnull Windows sources
|
||||
set(USBnullWindowsSources
|
||||
Windows/Config.cpp
|
||||
Windows/USBnull.def
|
||||
Windows/USBnull.rc
|
||||
Windows/Win32.cpp)
|
||||
)
|
||||
|
||||
# USBnull Windows headers
|
||||
set(USBnullWindowsHeaders
|
||||
Windows/resource.h)
|
||||
)
|
||||
|
||||
set(USBnullFinalSources
|
||||
${USBnullSources}
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
/* USBnull
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../USB.h"
|
||||
|
||||
extern HINSTANCE hInst;
|
||||
void SaveConfig()
|
||||
{
|
||||
|
||||
Config *Conf1 = &conf;
|
||||
char *szTemp;
|
||||
char szIniFile[256], szValue[256];
|
||||
|
||||
GetModuleFileName(GetModuleHandle((LPCSTR)hInst), szIniFile, 256);
|
||||
szTemp = strrchr(szIniFile, '\\');
|
||||
|
||||
if (!szTemp)
|
||||
return;
|
||||
strcpy(szTemp, "\\inis\\usbnull.ini");
|
||||
sprintf(szValue, "%u", Conf1->Log);
|
||||
WritePrivateProfileString("Interface", "Logging", szValue, szIniFile);
|
||||
}
|
||||
|
||||
void LoadConfig()
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
|
||||
Config *Conf1 = &conf;
|
||||
char *szTemp;
|
||||
char szIniFile[256], szValue[256];
|
||||
|
||||
GetModuleFileName(GetModuleHandle((LPCSTR)hInst), szIniFile, 256);
|
||||
szTemp = strrchr(szIniFile, '\\');
|
||||
|
||||
if (!szTemp)
|
||||
return;
|
||||
strcpy(szTemp, "\\inis\\usbnull.ini");
|
||||
fp = fopen("inis\\usbnull.ini", "rt"); //check if usbnull.ini really exists
|
||||
if (!fp) {
|
||||
CreateDirectory("inis", NULL);
|
||||
memset(&conf, 0, sizeof(conf));
|
||||
conf.Log = 0; //default value
|
||||
SaveConfig(); //save and return
|
||||
return;
|
||||
}
|
||||
fclose(fp);
|
||||
GetPrivateProfileString("Interface", "Logging", NULL, szValue, 20, szIniFile);
|
||||
Conf1->Log = strtoul(szValue, NULL, 10);
|
||||
return;
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
#
|
||||
# USBnull Makefile for MINGW32
|
||||
#
|
||||
|
||||
|
||||
all: plugin
|
||||
|
||||
CPU = ix86
|
||||
PLUGIN = USBnull.dll
|
||||
|
||||
CC = gcc
|
||||
NASM = nasmw
|
||||
RM = rm -f
|
||||
AR = ar
|
||||
STRIP = strip
|
||||
RC = windres
|
||||
|
||||
OPTIMIZE = -O2 -fomit-frame-pointer -finline-functions -ffast-math -fno-strict-aliasing -m128bit-long-double
|
||||
FLAGS = -D__WIN32__ -D__MINGW32__ # -DENABLE_NLS -DPACKAGE=\"pcsx2\"
|
||||
ASMFLAGS = -D__WIN32__ -i.. -i.# -DENABLE_NLS -DPACKAGE=\"pcsx2\"
|
||||
RC1FLAGS = -d__MINGW32__
|
||||
LIBS = -L./ -lcomctl32 -lwsock32 -lwinmm -lgdi32 -lcomdlg32
|
||||
RESOBJ = res.o
|
||||
|
||||
OBJS = ../USB.o
|
||||
OBJS+= Config.o Win32.o ${RESOBJ}
|
||||
|
||||
DEPS:= $(OBJS:.o=.d)
|
||||
|
||||
CFLAGS = -Wall ${OPTIMIZE} -I. -I.. -I/usr/local/include ${FLAGS}
|
||||
ASMFLAGS = -f elf ${FLAGS} -i./ -i../
|
||||
|
||||
plugin: ${OBJS}
|
||||
dllwrap --def plugin.def -o ${PLUGIN} ${OBJS}
|
||||
# ${CC} -shared -Wl,--kill-at ${CFLAGS} ${OBJS} -o ${PLUGIN} ${LIBS}
|
||||
${STRIP} ${PLUGIN}
|
||||
|
||||
.PHONY: clean plugin
|
||||
|
||||
clean:
|
||||
${RM} ${OBJS} ${DEPS} ${PLUGIN}
|
||||
|
||||
%.o: %.asm
|
||||
${NASM} ${ASMFLAGS} -o $@ $<
|
||||
|
||||
%.o: %.c
|
||||
${CC} ${CFLAGS} -c -o $@ $< -MD -MF $(patsubst %.o,%.d,$@)
|
||||
|
||||
${RESOBJ}: USBnull.rc
|
||||
${RC} -D__MINGW32__ -I rc -O coff -o $@ -i $<
|
||||
|
||||
-include ${DEPS}
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxresmw.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Spanish (Argentina) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESS)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_ARGENTINA
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxresmw.h""\r\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_CONFIG DIALOGEX 0, 0, 212, 121
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "USBconfigure"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,48,100,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,113,100,50,14
|
||||
CONTROL "Enable logging(for develop use only)",IDC_LOGGING,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,159,15
|
||||
END
|
||||
|
||||
IDD_ABOUT DIALOGEX 0, 0, 177, 106
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "USBabout"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,65,85,50,14
|
||||
LTEXT "USBnull Driver",IDC_NAME,70,10,47,8
|
||||
GROUPBOX "",IDC_STATIC,5,35,170,40
|
||||
LTEXT "Author: shadow@pcsx2.net",IDC_STATIC,20,20,141,10
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_CONFIG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 205
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 114
|
||||
END
|
||||
|
||||
IDD_ABOUT, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 170
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 99
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // Spanish (Argentina) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
/* USBnull
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
|
||||
#include "../USB.h"
|
||||
#include "resource.h"
|
||||
|
||||
HINSTANCE hInst;
|
||||
|
||||
void SysMessage(char *fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
char tmp[512];
|
||||
|
||||
va_start(list, fmt);
|
||||
vsprintf(tmp, fmt, list);
|
||||
va_end(list);
|
||||
MessageBox(GetActiveWindow(), tmp, "USBnull Msg", MB_SETFOREGROUND | MB_OK);
|
||||
}
|
||||
|
||||
BOOL CALLBACK ConfigureDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
||||
switch (uMsg) {
|
||||
case WM_INITDIALOG:
|
||||
LoadConfig();
|
||||
if (conf.Log)
|
||||
CheckDlgButton(hW, IDC_LOGGING, TRUE);
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam)) {
|
||||
case IDCANCEL:
|
||||
EndDialog(hW, TRUE);
|
||||
return TRUE;
|
||||
case IDOK:
|
||||
if (IsDlgButtonChecked(hW, IDC_LOGGING))
|
||||
conf.Log = 1;
|
||||
else
|
||||
conf.Log = 0;
|
||||
SaveConfig();
|
||||
EndDialog(hW, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg) {
|
||||
case WM_INITDIALOG:
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam)) {
|
||||
case IDOK:
|
||||
EndDialog(hW, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void CALLBACK USBconfigure()
|
||||
{
|
||||
DialogBox(hInst,
|
||||
MAKEINTRESOURCE(IDD_CONFIG),
|
||||
GetActiveWindow(),
|
||||
(DLGPROC)ConfigureDlgProc);
|
||||
}
|
||||
|
||||
void CALLBACK USBabout()
|
||||
{
|
||||
DialogBox(hInst,
|
||||
MAKEINTRESOURCE(IDD_ABOUT),
|
||||
GetActiveWindow(),
|
||||
(DLGPROC)AboutDlgProc);
|
||||
}
|
||||
|
||||
BOOL APIENTRY DllMain(HANDLE hModule, // DLL INIT
|
||||
DWORD dwReason,
|
||||
LPVOID lpReserved)
|
||||
{
|
||||
hInst = (HINSTANCE)hModule;
|
||||
return TRUE; // very quick :)
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by USBnull.rc
|
||||
//
|
||||
#define IDD_CONFDLG 101
|
||||
#define IDD_CONFIG 101
|
||||
#define IDD_ABOUT 103
|
||||
#define IDC_NAME 1000
|
||||
#define IDC_CHECK1 1007
|
||||
#define IDC_LOGGING 1007
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 105
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1008
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
Loading…
Reference in New Issue