mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-10 21:44:28 +00:00
Use precompiled headers for faster build of the DebuggerWX and Dolphin projects. Fix a silly memory leak in debug text in the GL plugin.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3846 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
6f28539ccc
commit
afe25626b1
@ -51,9 +51,10 @@
|
|||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="4"
|
DebugInformationFormat="4"
|
||||||
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -118,9 +119,10 @@
|
|||||||
ExceptionHandling="2"
|
ExceptionHandling="2"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -182,9 +184,10 @@
|
|||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
BufferSecurityCheck="false"
|
BufferSecurityCheck="false"
|
||||||
EnableEnhancedInstructionSet="2"
|
EnableEnhancedInstructionSet="2"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -246,9 +249,10 @@
|
|||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
BufferSecurityCheck="false"
|
BufferSecurityCheck="false"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -313,9 +317,10 @@
|
|||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
BufferSecurityCheck="false"
|
BufferSecurityCheck="false"
|
||||||
EnableEnhancedInstructionSet="2"
|
EnableEnhancedInstructionSet="2"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -378,9 +383,10 @@
|
|||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -647,6 +653,62 @@
|
|||||||
RelativePath=".\src\SConscript"
|
RelativePath=".\src\SConscript"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Src\stdafx.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="DebugFast|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="DebugFast|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Src\stdafx.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
</Globals>
|
</Globals>
|
||||||
|
18
Source/Core/DebuggerWX/Src/stdafx.cpp
Normal file
18
Source/Core/DebuggerWX/Src/stdafx.cpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// Copyright (C) 2003-2008 Dolphin Project.
|
||||||
|
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, version 2.0.
|
||||||
|
|
||||||
|
// This program 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 2.0 for more details.
|
||||||
|
|
||||||
|
// A copy of the GPL 2.0 should have been included with the program.
|
||||||
|
// If not, see http://www.gnu.org/licenses/
|
||||||
|
|
||||||
|
// Official SVN repository and contact information can be found at
|
||||||
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
33
Source/Core/DebuggerWX/Src/stdafx.h
Normal file
33
Source/Core/DebuggerWX/Src/stdafx.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
// Copyright (C) 2003-2008 Dolphin Project.
|
||||||
|
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, version 2.0.
|
||||||
|
|
||||||
|
// This program 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 2.0 for more details.
|
||||||
|
|
||||||
|
// A copy of the GPL 2.0 should have been included with the program.
|
||||||
|
// If not, see http://www.gnu.org/licenses/
|
||||||
|
|
||||||
|
// Official SVN repository and contact information can be found at
|
||||||
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
#ifndef __STDAFX_H_
|
||||||
|
#define __STDAFX_H_
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
|
||||||
|
// Change these values to use different versions
|
||||||
|
#define WINVER 0x0400
|
||||||
|
#define _WIN32_WINNT 0x0501
|
||||||
|
#define _WIN32_IE 0x0500
|
||||||
|
#define _RICHEDIT_VER 0x0100
|
||||||
|
|
||||||
|
#include <wx/wx.h> // wxWidgets
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __STDAFX_H__
|
@ -64,7 +64,7 @@
|
|||||||
EnableEnhancedInstructionSet="2"
|
EnableEnhancedInstructionSet="2"
|
||||||
FloatingPointModel="0"
|
FloatingPointModel="0"
|
||||||
RuntimeTypeInfo="false"
|
RuntimeTypeInfo="false"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
AssemblerListingLocation="$(IntDir)\"
|
||||||
ObjectFile="$(IntDir)\"
|
ObjectFile="$(IntDir)\"
|
||||||
@ -73,7 +73,7 @@
|
|||||||
WarnAsError="false"
|
WarnAsError="false"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
ForcedIncludeFiles=""
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -180,7 +180,7 @@
|
|||||||
EnableFunctionLevelLinking="false"
|
EnableFunctionLevelLinking="false"
|
||||||
FloatingPointModel="0"
|
FloatingPointModel="0"
|
||||||
RuntimeTypeInfo="true"
|
RuntimeTypeInfo="true"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
AssemblerListingLocation="$(IntDir)\"
|
||||||
ObjectFile="$(IntDir)\"
|
ObjectFile="$(IntDir)\"
|
||||||
@ -189,7 +189,7 @@
|
|||||||
WarnAsError="false"
|
WarnAsError="false"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
ForcedIncludeFiles=""
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -289,7 +289,7 @@
|
|||||||
FloatingPointModel="0"
|
FloatingPointModel="0"
|
||||||
TreatWChar_tAsBuiltInType="true"
|
TreatWChar_tAsBuiltInType="true"
|
||||||
RuntimeTypeInfo="true"
|
RuntimeTypeInfo="true"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
AssemblerListingLocation="$(IntDir)\"
|
||||||
ObjectFile="$(IntDir)\"
|
ObjectFile="$(IntDir)\"
|
||||||
@ -298,7 +298,7 @@
|
|||||||
WarnAsError="false"
|
WarnAsError="false"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
ForcedIncludeFiles=""
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -399,7 +399,7 @@
|
|||||||
FloatingPointModel="0"
|
FloatingPointModel="0"
|
||||||
TreatWChar_tAsBuiltInType="true"
|
TreatWChar_tAsBuiltInType="true"
|
||||||
RuntimeTypeInfo="true"
|
RuntimeTypeInfo="true"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
AssemblerListingLocation="$(IntDir)\"
|
||||||
ObjectFile="$(IntDir)\"
|
ObjectFile="$(IntDir)\"
|
||||||
@ -408,7 +408,7 @@
|
|||||||
WarnAsError="false"
|
WarnAsError="false"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
ForcedIncludeFiles=""
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -512,7 +512,7 @@
|
|||||||
EnableEnhancedInstructionSet="2"
|
EnableEnhancedInstructionSet="2"
|
||||||
FloatingPointModel="0"
|
FloatingPointModel="0"
|
||||||
RuntimeTypeInfo="true"
|
RuntimeTypeInfo="true"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
AssemblerListingLocation="$(IntDir)\"
|
||||||
ObjectFile="$(IntDir)\"
|
ObjectFile="$(IntDir)\"
|
||||||
@ -521,7 +521,7 @@
|
|||||||
WarnAsError="false"
|
WarnAsError="false"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
ForcedIncludeFiles=""
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -624,7 +624,7 @@
|
|||||||
EnableFunctionLevelLinking="true"
|
EnableFunctionLevelLinking="true"
|
||||||
FloatingPointModel="0"
|
FloatingPointModel="0"
|
||||||
RuntimeTypeInfo="true"
|
RuntimeTypeInfo="true"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
AssemblerListingLocation="$(IntDir)\"
|
||||||
ObjectFile="$(IntDir)\"
|
ObjectFile="$(IntDir)\"
|
||||||
@ -633,7 +633,7 @@
|
|||||||
WarnAsError="false"
|
WarnAsError="false"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
ForcedIncludeFiles=""
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -736,7 +736,7 @@
|
|||||||
EnableEnhancedInstructionSet="2"
|
EnableEnhancedInstructionSet="2"
|
||||||
FloatingPointModel="0"
|
FloatingPointModel="0"
|
||||||
RuntimeTypeInfo="false"
|
RuntimeTypeInfo="false"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
AssemblerListingLocation="$(IntDir)\"
|
||||||
ObjectFile="$(IntDir)\"
|
ObjectFile="$(IntDir)\"
|
||||||
@ -745,7 +745,7 @@
|
|||||||
WarnAsError="false"
|
WarnAsError="false"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
ForcedIncludeFiles=""
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -851,7 +851,7 @@
|
|||||||
EnableFunctionLevelLinking="false"
|
EnableFunctionLevelLinking="false"
|
||||||
FloatingPointModel="0"
|
FloatingPointModel="0"
|
||||||
RuntimeTypeInfo="true"
|
RuntimeTypeInfo="true"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="2"
|
||||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||||
AssemblerListingLocation="$(IntDir)\"
|
AssemblerListingLocation="$(IntDir)\"
|
||||||
ObjectFile="$(IntDir)\"
|
ObjectFile="$(IntDir)\"
|
||||||
@ -860,7 +860,7 @@
|
|||||||
WarnAsError="false"
|
WarnAsError="false"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
ForcedIncludeFiles=""
|
ForcedIncludeFiles="stdafx.h"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
@ -1174,18 +1174,314 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\Src\NetEvent.cpp"
|
RelativePath=".\Src\NetEvent.cpp"
|
||||||
>
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="DebugFast|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="DebugFast|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release_JITIL|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release_JITIL|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Src\NetFunctions.cpp"
|
RelativePath=".\Src\NetFunctions.cpp"
|
||||||
>
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="DebugFast|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="DebugFast|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release_JITIL|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release_JITIL|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Src\NetSockets.cpp"
|
RelativePath=".\Src\NetSockets.cpp"
|
||||||
>
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="DebugFast|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="DebugFast|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release_JITIL|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release_JITIL|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Src\NetSockets.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Src\NetStructs.h"
|
||||||
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Src\NetWindow.cpp"
|
RelativePath=".\Src\NetWindow.cpp"
|
||||||
>
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="DebugFast|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="DebugFast|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release_JITIL|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release_JITIL|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
ForcedIncludeFiles="$(NOINHERIT)"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Src\NetWindow.h"
|
RelativePath=".\Src\NetWindow.h"
|
||||||
@ -1309,7 +1605,7 @@
|
|||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="1"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
@ -1317,7 +1613,7 @@
|
|||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="1"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
@ -1325,7 +1621,7 @@
|
|||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="1"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
@ -1333,7 +1629,7 @@
|
|||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="1"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
@ -1341,7 +1637,7 @@
|
|||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="1"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
@ -1349,7 +1645,7 @@
|
|||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="1"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
@ -1357,7 +1653,7 @@
|
|||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="1"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
@ -1365,7 +1661,7 @@
|
|||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="1"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
#include "NetSockets.h"
|
||||||
#include "NetWindow.h"
|
#include "NetWindow.h"
|
||||||
|
|
||||||
void ClientSide::OnClientData(unsigned char data)
|
void ClientSide::OnClientData(unsigned char data)
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
#include "NetSockets.h"
|
||||||
#include "NetWindow.h"
|
#include "NetWindow.h"
|
||||||
#include "HW/SI_DeviceGCController.h"
|
#include "HW/SI_DeviceGCController.h"
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
#include "NetSockets.h"
|
||||||
#include "NetWindow.h"
|
#include "NetWindow.h"
|
||||||
|
|
||||||
//--------------------------------
|
//--------------------------------
|
||||||
|
128
Source/Core/DolphinWX/Src/NetSockets.h
Normal file
128
Source/Core/DolphinWX/Src/NetSockets.h
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
// Copyright (C) 2003-2009 Dolphin Project.
|
||||||
|
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, version 2.0.
|
||||||
|
|
||||||
|
// This program 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 2.0 for more details.
|
||||||
|
|
||||||
|
// A copy of the GPL 2.0 should have been included with the program.
|
||||||
|
// If not, see http://www.gnu.org/licenses/
|
||||||
|
|
||||||
|
// Official SVN repository and contact information can be found at
|
||||||
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
#ifndef _NETSOCKETS_H_
|
||||||
|
#define _NETSOCKETS_H_
|
||||||
|
|
||||||
|
#include <SFML/Network.hpp>
|
||||||
|
|
||||||
|
class NetPlay;
|
||||||
|
|
||||||
|
#include "Common.h"
|
||||||
|
#include "NetStructs.h"
|
||||||
|
|
||||||
|
#include <wx/wx.h>
|
||||||
|
|
||||||
|
|
||||||
|
struct Clients {
|
||||||
|
std::string nick;
|
||||||
|
sf::SocketTCP socket;
|
||||||
|
unsigned short port;
|
||||||
|
sf::IPAddress address;
|
||||||
|
bool ready;
|
||||||
|
};
|
||||||
|
|
||||||
|
class NetEvent
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
NetEvent(NetPlay* netptr) { m_netptr = netptr; }
|
||||||
|
~NetEvent() {};
|
||||||
|
|
||||||
|
void SendEvent(int EventType, std::string="NULL", int=NULL);
|
||||||
|
void AppendText(const wxString text);
|
||||||
|
|
||||||
|
private:
|
||||||
|
NetPlay *m_netptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ServerSide : public wxThread
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ServerSide(NetPlay* netptr, sf::SocketTCP, sf::SocketUDP, int netmodel, std::string nick);
|
||||||
|
~ServerSide() {};
|
||||||
|
|
||||||
|
virtual void *Entry();
|
||||||
|
|
||||||
|
void Write(int socknb, const char *data, size_t size, long *ping=NULL);
|
||||||
|
void WriteUDP(int socknb, const char *data, size_t size);
|
||||||
|
bool isNewPadData(u32 *netValues, bool current, int client=0);
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool SyncValues(unsigned char, sf::IPAddress);
|
||||||
|
bool RecvT(sf::SocketUDP Socket, char * Data, size_t Max, size_t& Recvd, float Time = 0);
|
||||||
|
char GetSocket(sf::SocketTCP Socket);
|
||||||
|
void OnServerData(int sock, unsigned char data);
|
||||||
|
void IsEveryoneReady();
|
||||||
|
|
||||||
|
NetPlay *m_netptr;
|
||||||
|
NetEvent *Event;
|
||||||
|
|
||||||
|
u32 m_netvalues[3][3];
|
||||||
|
bool m_data_received; // New Pad data received ?
|
||||||
|
|
||||||
|
unsigned char m_numplayers;
|
||||||
|
int m_netmodel;
|
||||||
|
std::string m_nick;
|
||||||
|
|
||||||
|
Clients m_client[3]; // Connected client objects
|
||||||
|
sf::SelectorTCP m_selector;
|
||||||
|
sf::SocketTCP m_socket; // Server 'listening' socket
|
||||||
|
sf::SocketUDP m_socketUDP;
|
||||||
|
|
||||||
|
wxCriticalSection m_CriticalSection;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ClientSide : public wxThread
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ClientSide(NetPlay* netptr, sf::SocketTCP, sf::SocketUDP, std::string addr, std::string nick);
|
||||||
|
~ClientSide() {}
|
||||||
|
|
||||||
|
virtual void *Entry();
|
||||||
|
|
||||||
|
void Write(const char *data, size_t size, long *ping=NULL);
|
||||||
|
void WriteUDP(const char *data, size_t size);
|
||||||
|
bool isNewPadData(u32 *netValues, bool current, bool isVersus=true);
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool SyncValues();
|
||||||
|
void CheckGameFound();
|
||||||
|
void OnClientData(unsigned char data);
|
||||||
|
bool RecvT(sf::SocketUDP Socket, char * Data, size_t Max, size_t& Recvd, float Time=0);
|
||||||
|
|
||||||
|
NetPlay *m_netptr;
|
||||||
|
NetEvent *Event;
|
||||||
|
|
||||||
|
u32 m_netvalues[3][3];
|
||||||
|
bool m_data_received; // New Pad data received ?
|
||||||
|
|
||||||
|
unsigned char m_numplayers;
|
||||||
|
int m_netmodel;
|
||||||
|
std::string m_nick;
|
||||||
|
std::string m_hostnick;
|
||||||
|
std::string m_selectedgame;
|
||||||
|
|
||||||
|
sf::SelectorTCP m_selector;
|
||||||
|
sf::SocketTCP m_socket; // Client I/O socket
|
||||||
|
sf::SocketUDP m_socketUDP;
|
||||||
|
unsigned short m_port;
|
||||||
|
std::string m_addr; // Contains the server addr
|
||||||
|
|
||||||
|
wxCriticalSection m_CriticalSection;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
26
Source/Core/DolphinWX/Src/NetStructs.h
Normal file
26
Source/Core/DolphinWX/Src/NetStructs.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
// Copyright (C) 2003-2009 Dolphin Project.
|
||||||
|
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, version 2.0.
|
||||||
|
|
||||||
|
// This program 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 2.0 for more details.
|
||||||
|
|
||||||
|
// A copy of the GPL 2.0 should have been included with the program.
|
||||||
|
// If not, see http://www.gnu.org/licenses/
|
||||||
|
|
||||||
|
// Official SVN repository and contact information can be found at
|
||||||
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
#ifndef _NETSTRUCTS_H
|
||||||
|
#define _NETSTRUCTS_H
|
||||||
|
|
||||||
|
struct Netpads {
|
||||||
|
int nHi[128];
|
||||||
|
int nLow[128];
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _NETSTRUCTS_H
|
@ -15,6 +15,7 @@
|
|||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
#include "NetSockets.h"
|
||||||
#include "NetWindow.h"
|
#include "NetWindow.h"
|
||||||
|
|
||||||
///////////////////////
|
///////////////////////
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#ifndef _NETWINDOW_H_
|
#ifndef _NETWINDOW_H_
|
||||||
#define _NETWINDOW_H_
|
#define _NETWINDOW_H_
|
||||||
|
|
||||||
#include <SFML/Network.hpp>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
@ -32,6 +31,7 @@
|
|||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "BootManager.h"
|
#include "BootManager.h"
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
#include "NetStructs.h"
|
||||||
#include "Core.h"
|
#include "Core.h"
|
||||||
#include "pluginspecs_pad.h"
|
#include "pluginspecs_pad.h"
|
||||||
#include "HW/SI.h"
|
#include "HW/SI.h"
|
||||||
@ -47,109 +47,8 @@
|
|||||||
// Unrealistic for Internet netplay, unless you have an uberfast connexion (<10ms ping)
|
// Unrealistic for Internet netplay, unless you have an uberfast connexion (<10ms ping)
|
||||||
// #define USE_TCP
|
// #define USE_TCP
|
||||||
|
|
||||||
class NetPlay;
|
class ServerSide;
|
||||||
|
class ClientSide;
|
||||||
struct Netpads {
|
|
||||||
int nHi[128];
|
|
||||||
int nLow[128];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Clients {
|
|
||||||
std::string nick;
|
|
||||||
sf::SocketTCP socket;
|
|
||||||
unsigned short port;
|
|
||||||
sf::IPAddress address;
|
|
||||||
bool ready;
|
|
||||||
};
|
|
||||||
|
|
||||||
class NetEvent
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NetEvent(NetPlay* netptr) { m_netptr = netptr; }
|
|
||||||
~NetEvent() {};
|
|
||||||
|
|
||||||
void SendEvent(int EventType, std::string="NULL", int=NULL);
|
|
||||||
void AppendText(const wxString text);
|
|
||||||
|
|
||||||
private:
|
|
||||||
NetPlay *m_netptr;
|
|
||||||
};
|
|
||||||
|
|
||||||
class ServerSide : public wxThread
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ServerSide(NetPlay* netptr, sf::SocketTCP, sf::SocketUDP, int netmodel, std::string nick);
|
|
||||||
~ServerSide() {};
|
|
||||||
|
|
||||||
virtual void *Entry();
|
|
||||||
|
|
||||||
void Write(int socknb, const char *data, size_t size, long *ping=NULL);
|
|
||||||
void WriteUDP(int socknb, const char *data, size_t size);
|
|
||||||
bool isNewPadData(u32 *netValues, bool current, int client=0);
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool SyncValues(unsigned char, sf::IPAddress);
|
|
||||||
bool RecvT(sf::SocketUDP Socket, char * Data, size_t Max, size_t& Recvd, float Time = 0);
|
|
||||||
char GetSocket(sf::SocketTCP Socket);
|
|
||||||
void OnServerData(int sock, unsigned char data);
|
|
||||||
void IsEveryoneReady();
|
|
||||||
|
|
||||||
NetPlay *m_netptr;
|
|
||||||
NetEvent *Event;
|
|
||||||
|
|
||||||
u32 m_netvalues[3][3];
|
|
||||||
bool m_data_received; // New Pad data received ?
|
|
||||||
|
|
||||||
unsigned char m_numplayers;
|
|
||||||
int m_netmodel;
|
|
||||||
std::string m_nick;
|
|
||||||
|
|
||||||
Clients m_client[3]; // Connected client objects
|
|
||||||
sf::SelectorTCP m_selector;
|
|
||||||
sf::SocketTCP m_socket; // Server 'listening' socket
|
|
||||||
sf::SocketUDP m_socketUDP;
|
|
||||||
|
|
||||||
wxCriticalSection m_CriticalSection;
|
|
||||||
};
|
|
||||||
|
|
||||||
class ClientSide : public wxThread
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ClientSide(NetPlay* netptr, sf::SocketTCP, sf::SocketUDP, std::string addr, std::string nick);
|
|
||||||
~ClientSide() {}
|
|
||||||
|
|
||||||
virtual void *Entry();
|
|
||||||
|
|
||||||
void Write(const char *data, size_t size, long *ping=NULL);
|
|
||||||
void WriteUDP(const char *data, size_t size);
|
|
||||||
bool isNewPadData(u32 *netValues, bool current, bool isVersus=true);
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool SyncValues();
|
|
||||||
void CheckGameFound();
|
|
||||||
void OnClientData(unsigned char data);
|
|
||||||
bool RecvT(sf::SocketUDP Socket, char * Data, size_t Max, size_t& Recvd, float Time=0);
|
|
||||||
|
|
||||||
NetPlay *m_netptr;
|
|
||||||
NetEvent *Event;
|
|
||||||
|
|
||||||
u32 m_netvalues[3][3];
|
|
||||||
bool m_data_received; // New Pad data received ?
|
|
||||||
|
|
||||||
unsigned char m_numplayers;
|
|
||||||
int m_netmodel;
|
|
||||||
std::string m_nick;
|
|
||||||
std::string m_hostnick;
|
|
||||||
std::string m_selectedgame;
|
|
||||||
|
|
||||||
sf::SelectorTCP m_selector;
|
|
||||||
sf::SocketTCP m_socket; // Client I/O socket
|
|
||||||
sf::SocketUDP m_socketUDP;
|
|
||||||
unsigned short m_port;
|
|
||||||
std::string m_addr; // Contains the server addr
|
|
||||||
|
|
||||||
wxCriticalSection m_CriticalSection;
|
|
||||||
};
|
|
||||||
|
|
||||||
class NetPlay : public wxFrame
|
class NetPlay : public wxFrame
|
||||||
{
|
{
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#define _WIN32_IE 0x0500
|
#define _WIN32_IE 0x0500
|
||||||
#define _RICHEDIT_VER 0x0100
|
#define _RICHEDIT_VER 0x0100
|
||||||
|
|
||||||
|
#include <wx/wx.h> // wxWidgets
|
||||||
|
|
||||||
#if defined _M_IX86
|
#if defined _M_IX86
|
||||||
|
|
||||||
|
@ -132,11 +132,14 @@ RasterFont::RasterFont()
|
|||||||
glBitmap(8, 13, 0.0f, 2.0f, 10.0f, 0.0f, rasters[i - 32]);
|
glBitmap(8, 13, 0.0f, 2.0f, 10.0f, 0.0f, rasters[i - 32]);
|
||||||
glEndList();
|
glEndList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
temp_buffer = new char[TEMP_BUFFER_SIZE];
|
||||||
}
|
}
|
||||||
|
|
||||||
RasterFont::~RasterFont()
|
RasterFont::~RasterFont()
|
||||||
{
|
{
|
||||||
glDeleteLists(fontOffset, 128);
|
glDeleteLists(fontOffset, 128);
|
||||||
|
delete [] temp_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterFont::printString(const char *s, double x, double y, double z)
|
void RasterFont::printString(const char *s, double x, double y, double z)
|
||||||
@ -144,10 +147,13 @@ void RasterFont::printString(const char *s, double x, double y, double z)
|
|||||||
int length = (int)strlen(s);
|
int length = (int)strlen(s);
|
||||||
if (!length)
|
if (!length)
|
||||||
return;
|
return;
|
||||||
|
if (length >= TEMP_BUFFER_SIZE)
|
||||||
|
length = TEMP_BUFFER_SIZE - 1;
|
||||||
|
|
||||||
// Sanitize string to avoid GL errors.
|
// Sanitize string to avoid GL errors.
|
||||||
char *s2 = new char[length + 1];
|
char *s2 = temp_buffer;
|
||||||
strcpy(s2, s);
|
memcpy(s2, s, length);
|
||||||
|
s2[length] = 0;
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
if (s2[i] < 32 || s2[i] > 126)
|
if (s2[i] < 32 || s2[i] > 126)
|
||||||
s2[i] = '!';
|
s2[i] = '!';
|
||||||
|
@ -19,9 +19,6 @@
|
|||||||
#define _RASTERFONT_H_
|
#define _RASTERFONT_H_
|
||||||
|
|
||||||
class RasterFont {
|
class RasterFont {
|
||||||
protected:
|
|
||||||
int fontOffset;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RasterFont();
|
RasterFont();
|
||||||
~RasterFont(void);
|
~RasterFont(void);
|
||||||
@ -36,6 +33,10 @@ public:
|
|||||||
void printCenteredString(const char *s, double y, int screen_width, double z=0.0);
|
void printCenteredString(const char *s, double y, int screen_width, double z=0.0);
|
||||||
|
|
||||||
void printMultilineText(const char *text, double x, double y, double z, int bbWidth, int bbHeight);
|
void printMultilineText(const char *text, double x, double y, double z, int bbWidth, int bbHeight);
|
||||||
|
private:
|
||||||
|
int fontOffset;
|
||||||
|
char *temp_buffer;
|
||||||
|
enum {TEMP_BUFFER_SIZE = 64 * 1024};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _RASTERFONT_H_
|
#endif // _RASTERFONT_H_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user