Nrage: Update version and change location of log and config dir
This commit is contained in:
parent
93404e32dc
commit
9d607af14f
|
@ -8,6 +8,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project64", "Source\Project
|
||||||
{731BD205-2826-4631-B7AF-117658E88DBC} = {731BD205-2826-4631-B7AF-117658E88DBC}
|
{731BD205-2826-4631-B7AF-117658E88DBC} = {731BD205-2826-4631-B7AF-117658E88DBC}
|
||||||
{A4D13408-A794-4199-8FC7-4A9A32505005} = {A4D13408-A794-4199-8FC7-4A9A32505005}
|
{A4D13408-A794-4199-8FC7-4A9A32505005} = {A4D13408-A794-4199-8FC7-4A9A32505005}
|
||||||
{3326E128-33AF-422C-BB7C-67CC6B915610} = {3326E128-33AF-422C-BB7C-67CC6B915610}
|
{3326E128-33AF-422C-BB7C-67CC6B915610} = {3326E128-33AF-422C-BB7C-67CC6B915610}
|
||||||
|
{FD617E80-9E40-4138-85DA-B94633972E6A} = {FD617E80-9E40-4138-85DA-B94633972E6A}
|
||||||
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421} = {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}
|
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421} = {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -76,7 +77,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SortRdb", "Source\SortRdb\S
|
||||||
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421} = {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}
|
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421} = {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NRage_Input_V2", "Source\nragev20\NRage_Input_V2.vcproj", "{FD617E80-9E40-4138-85DA-B94633972E6A}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PJ64 NRage", "Source\nragev20\NRage_Input_V2.vcproj", "{FD617E80-9E40-4138-85DA-B94633972E6A}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|
|
@ -293,7 +293,7 @@ void CSettings::AddHowToHandleSetting ()
|
||||||
AddHandler(Plugin_RSP_Current, new CSettingTypeApplication("Plugin","RSP Dll", "RSP\\RSP 1.7.dll"));
|
AddHandler(Plugin_RSP_Current, new CSettingTypeApplication("Plugin","RSP Dll", "RSP\\RSP 1.7.dll"));
|
||||||
AddHandler(Plugin_GFX_Current, new CSettingTypeApplication("Plugin","Graphics Dll", "GFX\\Jabo_Direct3D8.dll"));
|
AddHandler(Plugin_GFX_Current, new CSettingTypeApplication("Plugin","Graphics Dll", "GFX\\Jabo_Direct3D8.dll"));
|
||||||
AddHandler(Plugin_AUDIO_Current, new CSettingTypeApplication("Plugin","Audio Dll", "Audio\\Jabo_Dsound.dll"));
|
AddHandler(Plugin_AUDIO_Current, new CSettingTypeApplication("Plugin","Audio Dll", "Audio\\Jabo_Dsound.dll"));
|
||||||
AddHandler(Plugin_CONT_Current, new CSettingTypeApplication("Plugin","Controller Dll","Input\\Jabo_DInput.dll"));
|
AddHandler(Plugin_CONT_Current, new CSettingTypeApplication("Plugin","Controller Dll","Input\\PJ64_NRage.dll"));
|
||||||
|
|
||||||
AddHandler(Plugin_RSP_CurVer, new CSettingTypeApplication("Plugin","RSP Dll Ver", ""));
|
AddHandler(Plugin_RSP_CurVer, new CSettingTypeApplication("Plugin","RSP Dll Ver", ""));
|
||||||
AddHandler(Plugin_GFX_CurVer, new CSettingTypeApplication("Plugin","Graphics Dll Ver", ""));
|
AddHandler(Plugin_GFX_CurVer, new CSettingTypeApplication("Plugin","Graphics Dll Ver", ""));
|
||||||
|
|
|
@ -176,7 +176,7 @@ EXPORT void CALL GetKeys(int Control, BUTTONS * Keys );
|
||||||
the emulator to know how to handle each controller.
|
the emulator to know how to handle each controller.
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
EXPORT void CALL InitiateControllers (CONTROL_INFO ControlInfo);
|
EXPORT void CALL InitiateControllers (CONTROL_INFO * ControlInfo);
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
Function: ReadController
|
Function: ReadController
|
||||||
|
|
|
@ -41,7 +41,7 @@ void _DebugAnsiFileWrite( LPCSTR szRemark )
|
||||||
TCHAR szFile[] = _T("NRage-Debug.txt");
|
TCHAR szFile[] = _T("NRage-Debug.txt");
|
||||||
TCHAR szBuffer[MAX_PATH+1];
|
TCHAR szBuffer[MAX_PATH+1];
|
||||||
|
|
||||||
GetAbsoluteFileName( szBuffer, szFile, DIRECTORY_APPLICATION );
|
GetAbsoluteFileName( szBuffer, szFile, DIRECTORY_LOG );
|
||||||
hDebug = CreateFile( szBuffer, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
|
hDebug = CreateFile( szBuffer, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
|
||||||
if (hDebug != INVALID_HANDLE_VALUE)
|
if (hDebug != INVALID_HANDLE_VALUE)
|
||||||
SetFilePointer(hDebug, 0, 0, FILE_END);
|
SetFilePointer(hDebug, 0, 0, FILE_END);
|
||||||
|
|
|
@ -884,6 +884,8 @@ bool GetDirectory( LPTSTR pszDirectory, WORD wDirID )
|
||||||
*pSlash = 0;
|
*pSlash = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case DIRECTORY_LOG:
|
||||||
|
case DIRECTORY_CONFIG:
|
||||||
case DIRECTORY_APPLICATION:
|
case DIRECTORY_APPLICATION:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -911,6 +913,14 @@ bool GetDirectory( LPTSTR pszDirectory, WORD wDirID )
|
||||||
pSlash[2] = '\0';
|
pSlash[2] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bReturn && wDirID == DIRECTORY_CONFIG)
|
||||||
|
{
|
||||||
|
strcat(pszDirectory,"Config\\");
|
||||||
|
}
|
||||||
|
if (bReturn && wDirID == DIRECTORY_LOG)
|
||||||
|
{
|
||||||
|
strcat(pszDirectory,"Logs\\");
|
||||||
|
}
|
||||||
return bReturn;
|
return bReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1280,7 +1290,7 @@ bool StoreConfigToINI()
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
TCHAR szFilename[MAX_PATH];
|
TCHAR szFilename[MAX_PATH];
|
||||||
GetDirectory(szFilename, DIRECTORY_DLL);
|
GetDirectory(szFilename, DIRECTORY_CONFIG);
|
||||||
_tcscat(szFilename, _T("NRage.ini"));
|
_tcscat(szFilename, _T("NRage.ini"));
|
||||||
FILE *fFile = _tfopen(szFilename, _T("wS")); // write, optimize for sequential
|
FILE *fFile = _tfopen(szFilename, _T("wS")); // write, optimize for sequential
|
||||||
|
|
||||||
|
@ -1379,7 +1389,7 @@ bool LoadConfigFromINI()
|
||||||
char szLine[4096];
|
char szLine[4096];
|
||||||
|
|
||||||
TCHAR szFilename[MAX_PATH];
|
TCHAR szFilename[MAX_PATH];
|
||||||
GetDirectory(szFilename, DIRECTORY_DLL);
|
GetDirectory(szFilename, DIRECTORY_CONFIG);
|
||||||
_tcscat(szFilename, _T("NRage.ini"));
|
_tcscat(szFilename, _T("NRage.ini"));
|
||||||
fFile = _tfopen(szFilename, _T("rS")); // read, optimize for sequential
|
fFile = _tfopen(szFilename, _T("rS")); // read, optimize for sequential
|
||||||
|
|
||||||
|
@ -1419,7 +1429,7 @@ LANGID GetLanguageFromINI()
|
||||||
char szLine[4096];
|
char szLine[4096];
|
||||||
|
|
||||||
TCHAR szFilename[MAX_PATH];
|
TCHAR szFilename[MAX_PATH];
|
||||||
GetDirectory(szFilename, DIRECTORY_DLL);
|
GetDirectory(szFilename, DIRECTORY_CONFIG);
|
||||||
_tcscat(szFilename, _T("NRage.ini"));
|
_tcscat(szFilename, _T("NRage.ini"));
|
||||||
fFile = _tfopen(szFilename, _T("rS")); // read, optimize for sequential
|
fFile = _tfopen(szFilename, _T("rS")); // read, optimize for sequential
|
||||||
|
|
||||||
|
|
|
@ -203,6 +203,8 @@ unsigned long djbHash(const char *str);
|
||||||
#define DIRECTORY_MEMPAK 0
|
#define DIRECTORY_MEMPAK 0
|
||||||
#define DIRECTORY_GBROMS 1
|
#define DIRECTORY_GBROMS 1
|
||||||
#define DIRECTORY_GBSAVES 2
|
#define DIRECTORY_GBSAVES 2
|
||||||
|
#define DIRECTORY_CONFIG 252
|
||||||
|
#define DIRECTORY_LOG 253
|
||||||
#define DIRECTORY_DLL 254
|
#define DIRECTORY_DLL 254
|
||||||
#define DIRECTORY_APPLICATION 255
|
#define DIRECTORY_APPLICATION 255
|
||||||
#define DIRECTORY_INVALID 256
|
#define DIRECTORY_INVALID 256
|
||||||
|
|
|
@ -829,7 +829,7 @@ BOOL CALLBACK XControlsTabProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||||
case WM_USER_UPDATE:
|
case WM_USER_UPDATE:
|
||||||
{
|
{
|
||||||
TCHAR buffer[MAX_PATH];
|
TCHAR buffer[MAX_PATH];
|
||||||
GetDirectory( buffer, DIRECTORY_DLL );
|
GetDirectory( buffer, DIRECTORY_CONFIG );
|
||||||
_stprintf_s( buffer, _T("%sXInput Controller %d Config.xcc"), buffer, gController->nControl + 1 );
|
_stprintf_s( buffer, _T("%sXInput Controller %d Config.xcc"), buffer, gController->nControl + 1 );
|
||||||
FILE *saveFile = _tfopen( buffer, _T("rS") );
|
FILE *saveFile = _tfopen( buffer, _T("rS") );
|
||||||
if( saveFile )
|
if( saveFile )
|
||||||
|
@ -851,7 +851,7 @@ BOOL CALLBACK XControlsTabProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||||
StoreXInputControllerKeys( hDlg, gController );
|
StoreXInputControllerKeys( hDlg, gController );
|
||||||
{
|
{
|
||||||
TCHAR buffer[MAX_PATH];
|
TCHAR buffer[MAX_PATH];
|
||||||
GetDirectory( buffer, DIRECTORY_DLL );
|
GetDirectory( buffer, DIRECTORY_CONFIG );
|
||||||
_stprintf_s( buffer, _T("%sXInput Controller %d Config.xcc"), buffer, gController->nControl + 1 );
|
_stprintf_s( buffer, _T("%sXInput Controller %d Config.xcc"), buffer, gController->nControl + 1 );
|
||||||
FILE *saveFile = _tfopen( buffer, _T("wS") );
|
FILE *saveFile = _tfopen( buffer, _T("wS") );
|
||||||
SaveXInputConfigToFile( saveFile, gController );
|
SaveXInputConfigToFile( saveFile, gController );
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "PakIO.h"
|
#include "PakIO.h"
|
||||||
#include "DirectInput.h"
|
#include "DirectInput.h"
|
||||||
#include "International.h"
|
#include "International.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
// ProtoTypes //
|
// ProtoTypes //
|
||||||
bool prepareHeap();
|
bool prepareHeap();
|
||||||
|
@ -148,12 +149,11 @@ BOOL APIENTRY DllMain( HINSTANCE hModule, DWORD ul_reason_for_call, LPVOID lpRe
|
||||||
EXPORT void CALL GetDllInfo ( PLUGIN_INFO* PluginInfo )
|
EXPORT void CALL GetDllInfo ( PLUGIN_INFO* PluginInfo )
|
||||||
{
|
{
|
||||||
DebugWriteA("CALLED: GetDllInfo\n");
|
DebugWriteA("CALLED: GetDllInfo\n");
|
||||||
strncpy(PluginInfo->Name, STRING_PLUGINNAME
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
" (Debug)"
|
sprintf(PluginInfo->Name,"N-Rage For PJ64 (Debug): %s",VER_FILE_VERSION_STR);
|
||||||
|
#else
|
||||||
|
sprintf(PluginInfo->Name,"N-Rage For PJ64: %s",VER_FILE_VERSION_STR);
|
||||||
#endif
|
#endif
|
||||||
": " VERSIONNUMBER
|
|
||||||
, sizeof(PluginInfo->Name));
|
|
||||||
PluginInfo->Type = PLUGIN_TYPE_CONTROLLER;
|
PluginInfo->Type = PLUGIN_TYPE_CONTROLLER;
|
||||||
PluginInfo->Version = SPECS_VERSION;
|
PluginInfo->Version = SPECS_VERSION;
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,7 @@ EXPORT void CALL InitiateControllers( HWND hMainWindow, CONTROL Controls[4])
|
||||||
the emulator to know how to handle each controller.
|
the emulator to know how to handle each controller.
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
EXPORT void CALL InitiateControllers (CONTROL_INFO ControlInfo)
|
EXPORT void CALL InitiateControllers (CONTROL_INFO * ControlInfo)
|
||||||
|
|
||||||
#endif // SPECS_VERSION
|
#endif // SPECS_VERSION
|
||||||
{
|
{
|
||||||
|
@ -324,9 +324,9 @@ EXPORT void CALL InitiateControllers (CONTROL_INFO ControlInfo)
|
||||||
g_strEmuInfo.hMainWindow = hMainWindow;
|
g_strEmuInfo.hMainWindow = hMainWindow;
|
||||||
// g_strEmuInfo.HEADER = NULL;
|
// g_strEmuInfo.HEADER = NULL;
|
||||||
#elif SPECS_VERSION >= 0x0101
|
#elif SPECS_VERSION >= 0x0101
|
||||||
g_strEmuInfo.hMainWindow = ControlInfo.hMainWindow;
|
g_strEmuInfo.hMainWindow = ControlInfo->hMainWindow;
|
||||||
// g_strEmuInfo.MemoryBswaped = ControlInfo.MemoryBswaped;
|
// g_strEmuInfo.MemoryBswaped = ControlInfo->MemoryBswaped;
|
||||||
// g_strEmuInfo.HEADER = ControlInfo.HEADER;
|
// g_strEmuInfo.HEADER = ControlInfo->HEADER;
|
||||||
// UNDONE: Instead of just storing the header, figure out what ROM we're running and save that information somewhere
|
// UNDONE: Instead of just storing the header, figure out what ROM we're running and save that information somewhere
|
||||||
#endif // SPECS_VERSION
|
#endif // SPECS_VERSION
|
||||||
|
|
||||||
|
@ -434,7 +434,7 @@ EXPORT void CALL InitiateControllers (CONTROL_INFO ControlInfo)
|
||||||
#if SPECS_VERSION == 0x0100
|
#if SPECS_VERSION == 0x0100
|
||||||
FillControls(Controls);
|
FillControls(Controls);
|
||||||
#elif SPECS_VERSION >= 0x0101
|
#elif SPECS_VERSION >= 0x0101
|
||||||
FillControls(ControlInfo.Controls);
|
FillControls(ControlInfo->Controls);
|
||||||
#endif // SPECS_VERSION
|
#endif // SPECS_VERSION
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
//General Plugin
|
//General Plugin
|
||||||
|
|
||||||
#define STRING_PLUGINNAME "N-Rage Input Plugin V2"
|
#define STRING_PLUGINNAME "N-Rage For PJ64 "
|
||||||
|
|
||||||
#define TIMER_MESSAGEWINDOW 123
|
#define TIMER_MESSAGEWINDOW 123
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9.00"
|
Version="9.00"
|
||||||
Name="NRage_Input_V2"
|
Name="PJ64 NRage"
|
||||||
ProjectGUID="{FD617E80-9E40-4138-85DA-B94633972E6A}"
|
ProjectGUID="{FD617E80-9E40-4138-85DA-B94633972E6A}"
|
||||||
RootNamespace="NRage_Input_V2"
|
RootNamespace="PJ64 NRage"
|
||||||
TargetFrameworkVersion="131072"
|
TargetFrameworkVersion="131072"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="xinput.lib dinput8.lib dxguid.lib Comctl32.lib"
|
AdditionalDependencies="xinput.lib dinput8.lib dxguid.lib Comctl32.lib"
|
||||||
OutputFile="$(Root)Plugin/Input/NRage_Input_V2_d.dll"
|
OutputFile="$(Root)Plugin/Input/PJ64_NRage_d.dll"
|
||||||
AdditionalLibraryDirectories=""$(Root)Source\3rd Party\directx\lib""
|
AdditionalLibraryDirectories=""$(Root)Source\3rd Party\directx\lib""
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="xinput.lib dinput8.lib dxguid.lib Comctl32.lib"
|
AdditionalDependencies="xinput.lib dinput8.lib dxguid.lib Comctl32.lib"
|
||||||
OutputFile="$(Root)Plugin/Input/NRage_Input_V2.dll"
|
OutputFile="$(Root)Plugin/Input/PJ64_NRage.dll"
|
||||||
AdditionalLibraryDirectories=""$(Root)Source\3rd Party\directx\lib""
|
AdditionalLibraryDirectories=""$(Root)Source\3rd Party\directx\lib""
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -254,6 +254,10 @@
|
||||||
RelativePath="settings.h"
|
RelativePath="settings.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Version.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Resource Files"
|
Name="Resource Files"
|
||||||
|
|
|
@ -140,7 +140,7 @@ LCleanup:
|
||||||
void AxisDeadzone( SHORT &AxisValue, long lDeadZoneValue, float fDeadZoneRelation )
|
void AxisDeadzone( SHORT &AxisValue, long lDeadZoneValue, float fDeadZoneRelation )
|
||||||
{
|
{
|
||||||
short sign = AxisValue < 0 ? -1 : 1;
|
short sign = AxisValue < 0 ? -1 : 1;
|
||||||
float value = AxisValue < 0 ? -AxisValue : AxisValue;
|
float value = (float)(AxisValue < 0 ? -AxisValue : AxisValue);
|
||||||
|
|
||||||
if(value < lDeadZoneValue)
|
if(value < lDeadZoneValue)
|
||||||
value = 0;
|
value = 0;
|
||||||
|
@ -308,7 +308,7 @@ bool InitiateXInputController( LPXCONTROLLER gController, int nControl )
|
||||||
gController->nControl = nControl;
|
gController->nControl = nControl;
|
||||||
|
|
||||||
TCHAR buffer[MAX_PATH];
|
TCHAR buffer[MAX_PATH];
|
||||||
GetDirectory( buffer, DIRECTORY_DLL );
|
GetDirectory( buffer, DIRECTORY_CONFIG );
|
||||||
_stprintf_s( buffer, _T("%sXInput Controller %d Config.xcc"), buffer, gController->nControl + 1 );
|
_stprintf_s( buffer, _T("%sXInput Controller %d Config.xcc"), buffer, gController->nControl + 1 );
|
||||||
FILE *file = _tfopen( buffer, _T("rS") );
|
FILE *file = _tfopen( buffer, _T("rS") );
|
||||||
if( file )
|
if( file )
|
||||||
|
|
|
@ -50,9 +50,9 @@ typedef const unsigned char *const unsigned char *;
|
||||||
#define DEFAULT_BUFFER 256
|
#define DEFAULT_BUFFER 256
|
||||||
|
|
||||||
// conform to Plugin Specs 1.0
|
// conform to Plugin Specs 1.0
|
||||||
#define SPECS_VERSION 0x0100
|
//#define SPECS_VERSION 0x0100
|
||||||
// conform to Plugin Specs 1.1
|
// conform to Plugin Specs 1.1
|
||||||
// #define SPECS_VERSION 0x0101
|
#define SPECS_VERSION 0x0101
|
||||||
|
|
||||||
// use default settings for Release and Debugbuild
|
// use default settings for Release and Debugbuild
|
||||||
#define STDCONFIG
|
#define STDCONFIG
|
||||||
|
|
Loading…
Reference in New Issue