1.22.1.3: New cmd line switch: -no-di

. Disable DirectInput, ie. for DIMouse
This commit is contained in:
tomch 2013-03-23 14:14:48 +00:00
parent 639f1e88e1
commit a99df90c25
5 changed files with 20 additions and 9 deletions

View File

@ -253,8 +253,8 @@ DISK_ICON ICON "DISK.ICO"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,22,1,2
PRODUCTVERSION 1,22,1,2
FILEVERSION 1,22,1,3
PRODUCTVERSION 1,22,1,3
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -272,12 +272,12 @@ BEGIN
VALUE "Comments", "http://applewin.berlios.de"
VALUE "CompanyName", "AppleWin"
VALUE "FileDescription", "Apple //e Emulator for Windows"
VALUE "FileVersion", "1, 22, 1, 2"
VALUE "FileVersion", "1, 22, 1, 3"
VALUE "InternalName", "APPLEWIN"
VALUE "LegalCopyright", " 1994-2013 Michael O'Brien, Oliver Schmidt, Tom Charlesworth, Michael Pohoreski, Nick Westgate, Linards Ticmanis"
VALUE "OriginalFilename", "APPLEWIN.EXE"
VALUE "ProductName", "Apple //e Emulator"
VALUE "ProductVersion", "1, 22, 1, 2"
VALUE "ProductVersion", "1, 22, 1, 3"
END
END
BLOCK "VarFileInfo"

View File

@ -79,6 +79,7 @@ int g_nCpuCyclesFeedback = 0;
DWORD g_dwCyclesThisFrame = 0;
FILE* g_fh = NULL;
bool g_bDisableDirectInput = false;
bool g_bDisableDirectSound = false;
bool g_bDisableDirectSoundMockingboard = false;
@ -762,6 +763,10 @@ int APIENTRY WinMain (HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, (LPTSTR)aTimeStr, sizeof(aTimeStr));
fprintf(g_fh, "*** Logging started: %s %s\n", aDateStr, aTimeStr);
}
else if(strcmp(lpCmdLine, "-no-di") == 0)
{
g_bDisableDirectInput = true;
}
else if(strcmp(lpCmdLine, "-m") == 0)
{
g_bDisableDirectSound = true;

View File

@ -40,6 +40,7 @@ extern int g_nCpuCyclesFeedback;
extern DWORD g_dwCyclesThisFrame;
extern FILE* g_fh; // Filehandle for log file
extern bool g_bDisableDirectInput; // Cmd line switch: don't init DI (so no DIMouse support)
extern bool g_bDisableDirectSound; // Cmd line switch: don't init DS (so no MB/Speaker support)
extern bool g_bDisableDirectSoundMockingboard; // Cmd line switch: don't init MB support

View File

@ -1188,7 +1188,7 @@ static bool MB_DSInit()
}
bRes = DSGetLock(SSI263Voice[i].lpDSBvoice, 0, 0, &pDSLockedBuffer, &dwDSLockedBufferSize, NULL, 0);
LogFileOutput("MB_DSInit: (%02d) DSGetLock(), res=%d\n", i, bRes ? 1 : 0); // WARNING: Lock acquired && doing heavy-weight logging
//LogFileOutput("MB_DSInit: (%02d) DSGetLock(), res=%d\n", i, bRes ? 1 : 0); // WARNING: Lock acquired && doing heavy-weight logging
if(FAILED(hr))
{
if(g_fh) fprintf(g_fh, "SSI263: DSGetLock failed (%08X)\n",hr);
@ -1206,7 +1206,7 @@ static bool MB_DSInit()
}
hr = SSI263Voice[i].lpDSBvoice->QueryInterface(IID_IDirectSoundNotify, (LPVOID *)&SSI263Voice[i].lpDSNotify);
LogFileOutput("MB_DSInit: (%02d) QueryInterface(), hr=0x%08X\n", i, hr); // WARNING: Lock acquired && doing heavy-weight logging
//LogFileOutput("MB_DSInit: (%02d) QueryInterface(), hr=0x%08X\n", i, hr); // WARNING: Lock acquired && doing heavy-weight logging
if(FAILED(hr))
{
if(g_fh) fprintf(g_fh, "SSI263: QueryInterface failed (%08X)\n",hr);
@ -1220,7 +1220,7 @@ static bool MB_DSInit()
PositionNotify.hEventNotify = g_hSSI263Event[0];
hr = SSI263Voice[i].lpDSNotify->SetNotificationPositions(1, &PositionNotify);
LogFileOutput("MB_DSInit: (%02d) SetNotificationPositions(), hr=0x%08X\n", i, hr); // WARNING: Lock acquired && doing heavy-weight logging
//LogFileOutput("MB_DSInit: (%02d) SetNotificationPositions(), hr=0x%08X\n", i, hr); // WARNING: Lock acquired && doing heavy-weight logging
if(FAILED(hr))
{
if(g_fh) fprintf(g_fh, "SSI263: SetNotifyPos failed (%08X)\n",hr);

View File

@ -593,6 +593,8 @@ void CMouseInterface::SetButton(eBUTTON Button, eBUTTONSTATE State)
#include <dinput.h>
extern bool g_bDisableDirectInput; // currently in AppleWin.h
namespace DIMouse
{
@ -608,7 +610,10 @@ namespace DIMouse
//-----------------------------------------------------------------------------
HRESULT DirectInputInit( HWND hDlg )
{
LogFileOutput("DirectInputInit\n");
LogFileOutput("DirectInputInit: g_bDisableDirectInput=%d\n", g_bDisableDirectInput);
if (g_bDisableDirectInput)
return S_OK;
#ifdef NO_DIRECT_X
return E_FAIL;
@ -641,7 +646,7 @@ namespace DIMouse
// Create a DInput object
hr = DirectInput8Create( GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (VOID**)&g_pDI, NULL );
LogFileOutput("DirectInputInit: DirectInputUninit(), hr=0x%08X\n", hr);
LogFileOutput("DirectInputInit: DirectInput8Create(), hr=0x%08X\n", hr);
if (FAILED(hr))
return hr;