Common: Moved Windows console functions to common

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1887 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-01-17 14:28:09 +00:00
parent 7f9ce70b33
commit ae9cfbd8e3
70 changed files with 1337 additions and 2987 deletions

View File

@ -227,18 +227,115 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\Src\Console.cpp"
>
</File>
<File
RelativePath=".\Src\Console.h"
>
</File>
</Files>
<Globals>
</Globals>

View File

@ -1,134 +0,0 @@
// 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
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//#include <iostream>
#include <string>
//#include "stdafx.h"
#include <stdio.h>
#include <windows.h>
//#include <tchar.h>
/////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// Declarations and definitions
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// Enable or disable logging to screen and file
#define MM_DEBUG
//#define MM_DEBUG_FILEONLY
#ifdef MM_DEBUG
FILE* __fStdOut = NULL;
#endif
#ifndef MM_DEBUG_FILEONLY
HANDLE __hStdOut = NULL;
#endif
/////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// Start console window
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Width and height is the size of console window, if you specify fname, the output will
also be writton to this file. The file pointer is automatically closed
when you close the application. */
// ---------------------
void StartConsoleWin(int width, int height, char* fname)
{
#ifdef MM_DEBUG
#ifndef MM_DEBUG_FILEONLY
// Allocate console
AllocConsole();
// Set console window title
SetConsoleTitle(fname);
// Get window handle to write to
__hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
// Create coordinates table
COORD co = {width, height};
// Set the innteral letter space
SetConsoleScreenBufferSize(__hStdOut, co);
// Set the window width and height
SMALL_RECT coo = {0,0, (width - 1),50}; // Top, left, right, bottom
SetConsoleWindowInfo(__hStdOut, true, &coo);
#endif
if(fname)
{
// Edit the log file name
std::string FileEnding = ".log";
std::string FileName = fname;
std::string FullFilename = (FileName + FileEnding);
__fStdOut = fopen(FullFilename.c_str(), "w");
}
#endif
}
/////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// Printf function
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int wprintf(char *fmt, ...)
{
#ifdef MM_DEBUG
char s[500]; // Bigget message size
va_list argptr;
int cnt;
va_start(argptr, fmt);
cnt = vsprintf(s, fmt, argptr);
va_end(argptr);
DWORD cCharsWritten;
// ---------------------------------------------------
// Write to console
// --------------
#ifndef MM_DEBUG_FILEONLY
if(__hStdOut)
WriteConsole(__hStdOut, s, strlen(s), &cCharsWritten, NULL);
#endif
// ----------------------------
// Write to file
if(__fStdOut)
{
fprintf(__fStdOut, s);
fflush(__fStdOut); // Write file now, don't wait
}
return(cnt);
#else
return 0;
#endif
}
/////////////////////////////

View File

@ -1,29 +0,0 @@
// 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 MM_COMMON_H
#define MM_COMMON_H
//////////////////////////////////////////////////////////////////////////////////////////
// Declarations and definitions
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void StartConsoleWin(int width = 100, int height = 2000, char* fname = "Console");
int wprintf(char *fmt, ...);
//////////////////////////////////
#endif // MM_COMMON_H

View File

@ -169,7 +169,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\..\Source\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Source\Core\Core\Src"
PreprocessorDefinitions="_SECURE_SCL=0"
PreprocessorDefinitions="NDEBUG;_SECURE_SCL=0"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
WarningLevel="3"
@ -268,6 +268,133 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\..\Source\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Source\Core\Core\Src"
PreprocessorDefinitions="NDEBUG;DEBUGFAST;_SECURE_SCL=0"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalOptions="/NODEFAULTLIB:msvcrt"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\..\Source\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Source\Core\Core\Src"
PreprocessorDefinitions="_SECURE_SCL=0"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalOptions="/NODEFAULTLIB:msvcrt"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -24,6 +24,7 @@
#include "Core.h" // Core
#include "IniFile.h" // Common
#include "ConsoleWindow.h"
#include "../../../../Source/Core/DolphinWX/Src/Globals.h" // DolphinWX
#include "../../../../Source/Core/DolphinWX/Src/Frame.h"
@ -34,7 +35,6 @@
#include "../../../../Source/Core/DolphinWX/resources/KDE.h"
#include "../../../../Source/Core/DolphinWX/resources/X-Plastik.h"
#include "../../Common/Src/Console.h" // Local
#include "../../Player/Src/PlayerExport.h" // Player
//////////////////////////////////
@ -282,7 +282,7 @@ CFrame::MM_UpdateGUI()
void
CFrame::MM_OnPlay()
{
//wprintf("\nCFrame::OnPlayMusicMod > Begin\n");
//Console::Print("\nCFrame::OnPlayMusicMod > Begin\n");
// Save the volume
MusicMod::GlobalVolume = mm_Slider->GetValue();
@ -296,7 +296,7 @@ CFrame::MM_OnPlay()
{
if (Core::GetState() == Core::CORE_RUN)
{
//wprintf("CFrame::OnPlayMusicMod > Pause\n");
//Console::Print("CFrame::OnPlayMusicMod > Pause\n");
if(!MusicMod::GlobalPause) // we may has set this elsewhere
{
MusicMod::GlobalPause = true;
@ -308,7 +308,7 @@ CFrame::MM_OnPlay()
}
else
{
//wprintf("CFrame::OnPlayMusicMod > Play\n");
//Console::Print("CFrame::OnPlayMusicMod > Play\n");
if(MusicMod::GlobalPause) // we may has set this elsewhere
{
MusicMod::GlobalPause = false;
@ -336,7 +336,7 @@ CFrame::MM_OnStop()
void
CFrame::MM_OnMute(wxCommandEvent& WXUNUSED (event))
{
//wprintf("CFrame::OnMute > Begin\n");
//Console::Print("CFrame::OnMute > Begin\n");
//MessageBox(0, "", "", 0);
if(!MusicMod::GlobalMute)
@ -368,7 +368,7 @@ CFrame::MM_OnMute(wxCommandEvent& WXUNUSED (event))
void
CFrame::MM_OnPause(wxCommandEvent& WXUNUSED (event))
{
wprintf("CFrame::OnPause > Begin\n");
Console::Print("CFrame::OnPause > Begin\n");
//MessageBox(0, "", "", 0);
if(!MusicMod::GlobalPause)
@ -399,7 +399,7 @@ CFrame::MM_OnPause(wxCommandEvent& WXUNUSED (event))
// ---------------------------------------------------------------------------------------
void CFrame::MM_OnVolume(wxScrollEvent& event)
{
//wprintf("CFrame::OnVolume > Begin <%i>\n", event.GetPosition());
//Console::Print("CFrame::OnVolume > Begin <%i>\n", event.GetPosition());
//MessageBox(0, "", "", 0);
//if(event.GetEventType() == wxEVT_SCROLL_PAGEUP || event.GetEventType() == wxEVT_SCROLL_PAGEDOWN)
@ -434,7 +434,7 @@ void CFrame::MM_OnVolume(wxScrollEvent& event)
// ---------------------------------------------------------------------------------------
void CFrame::MM_OnLog(wxCommandEvent& event)
{
//wprintf("CFrame::OnLog > Begin\n");
//Console::Print("CFrame::OnLog > Begin\n");
//MessageBox(0, "", "", 0);
if(!MusicMod::dllloaded) return; // Avoid crash
@ -450,7 +450,7 @@ void CFrame::MM_OnLog(wxCommandEvent& event)
else
{
#if defined (_WIN32)
FreeConsole(); Player_Console(false);
Console::Close(); Player_Console(false);
#endif
}

View File

@ -24,7 +24,9 @@
#include <string>
#include <windows.h>
#include "IniFile.h" // Common
#include "Common.h" // Common
#include "IniFile.h"
#include "ConsoleWindow.h"
#include "PowerPC/PowerPc.h" // Core
@ -32,7 +34,6 @@
#include "../../../../Source/Core/DiscIO/Src/VolumeCreator.h"
#include "../../Player/Src/PlayerExport.h" // Local player
#include "../../Common/Src/Console.h" // Local common
//////////////////////////////////
@ -54,7 +55,7 @@ void StructSort (std::vector <MyFilesStructure> &MyFiles);
// Playback
std::string currentfile;
std::string CurrentFile;
std::string unique_gameid;
std::string MusicPath;
@ -95,7 +96,7 @@ void StructSort (std::vector <MyFilesStructure> &MyFiles)
{
MyFilesStructure temp;
//wprintf("StructSort > Begin\n");
//Console::Print("StructSort > Begin\n");
for(int i = 0; i < MyFiles.size() - 1; i++)
{
@ -116,7 +117,7 @@ void StructSort (std::vector <MyFilesStructure> &MyFiles)
std::cout << i << " " << MyFiles[i].path.c_str() << "#" << MyFiles[i].offset << "\n";
}
//wprintf("StructSort > Done\n");
//Console::Print("StructSort > Done\n");
}
// ============================
@ -126,7 +127,7 @@ void StructSort (std::vector <MyFilesStructure> &MyFiles)
// ------------------------
void ShowConsole()
{
StartConsoleWin(100, 2000, "Console"); // Give room for 2000 rows
Console::Open(100, 2000, "MusicMod", true); // Give room for 2000 rows
}
void Init()
@ -150,9 +151,9 @@ void Init()
// Write version
#ifdef _M_X64
wprintf("64 bit version\n");
Console::Print("64 bit version\n");
#else
wprintf("32 bit version\n");
Console::Print("32 bit version\n");
#endif
// -----------
@ -162,10 +163,11 @@ void Init()
// Show DLL status
Player_Main(MusicMod::bShowConsole);
//play_file("c:\\demo36_02.ast");
//wprintf("DLL loaded\n");
//Console::Print("DLL loaded\n");
dllloaded = true; // Do this once
}
// ============================
// =======================================================================================
@ -198,7 +200,7 @@ void Main(std::string FileName)
LPSECURITY_ATTRIBUTES attr;
attr = NULL;
MusicPath = "Music\\";
wprintf("Created a Music directory\n");
Console::Print("Created a Music directory\n");
CreateDirectory(MusicPath.c_str(), attr);
// ----------------------------------------------------------------------------------------
}
@ -210,16 +212,16 @@ void Main(std::string FileName)
void CheckFile(std::string File, int FileNumber)
{
// Do nothing if we found the same file again
if (currentfile == File) return;
if (CurrentFile == File) return;
//wprintf(">>>> (%i)Current read %s <%u = %ux%i> <block %u>\n", i, CurrentFiles[i].path.c_str(), offset, CurrentFiles[i].offset, size);
//Console::Print(">>>> (%i)Current read %s <%u = %ux%i> <block %u>\n", i, CurrentFiles[i].path.c_str(), offset, CurrentFiles[i].offset, size);
if (CheckFileEnding(File.c_str()))
{
wprintf("\n >>> (%i/%i) Match %s\n\n", FileNumber,
Console::Print("\n >>> (%i/%i) Match %s\n\n", FileNumber,
MyFiles.size(), File.c_str());
currentfile = File; // save the found file
CurrentFile = File; // Save the found file
// ---------------------------------------------------------------------------------------
// We will now save the file to the PC hard drive
@ -235,7 +237,7 @@ void CheckFile(std::string File, int FileNumber)
std::string FilePath = (MusicPath + fragment);
// ---------------------------------------------------------------------------------------
WritingFile = true; // Avoid detecting the file we are writing
wprintf("Writing <%s> to <%s>\n", File.c_str(), FilePath.c_str());
Console::Print("Writing <%s> to <%s>\n", File.c_str(), FilePath.c_str());
my_pFileSystem->ExportFile(File.c_str(), FilePath.c_str());
WritingFile = false;
@ -245,7 +247,7 @@ void CheckFile(std::string File, int FileNumber)
{
Player_Play((char*)FilePath.c_str()); // retype it from const char* to char*
} else {
wprintf("Warning > Music DLL is not loaded");
Console::Print("Warning > Music DLL is not loaded");
}
// ---------------------------------------------------------------------------------------
@ -254,9 +256,9 @@ void CheckFile(std::string File, int FileNumber)
{
if(!remove(CurrentPlayFile.c_str()))
{
wprintf("The program failed to remove <%s>\n", CurrentPlayFile.c_str());
Console::Print("The program failed to remove <%s>\n", CurrentPlayFile.c_str());
} else {
wprintf("The program removed <%s>\n", CurrentPlayFile.c_str());
Console::Print("The program removed <%s>\n", CurrentPlayFile.c_str());
}
}
@ -268,11 +270,11 @@ void CheckFile(std::string File, int FileNumber)
}
// Tell about the files we ignored
wprintf("(%i/%i) Ignored %s\n", FileNumber, MyFiles.size(), File.c_str());
// Tell the user about the files we ignored
Console::Print("(%i/%i) Ignored %s\n", FileNumber, MyFiles.size(), File.c_str());
// Update the current file
currentfile = File;
CurrentFile = File;
}
@ -328,4 +330,4 @@ void FindFilename(u64 offset, u64 size)
/////////////////////////////////
} // end of namespace
} // end of namespace

View File

@ -45,6 +45,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\Source\Core\Common\Src"
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_SECURE_SCL=0"
MinimalRebuild="false"
BasicRuntimeChecks="0"
@ -211,6 +212,7 @@
Name="VCCLCompilerTool"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\..\..\Source\Core\Common\Src"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_SECURE_SCL=0"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
@ -346,6 +348,169 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\..\..\Source\Core\Common\Src"
PreprocessorDefinitions="WIN32;DEBUGFAST;_WINDOWS;_SECURE_SCL=0"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/NODEFAULTLIB:msvcrt"
AdditionalDependencies="libzlib1.lib comctl32.lib winmm.lib"
OutputFile="$(OutDir)/Plainamp.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="Lib"
GenerateDebugInformation="false"
SubSystem="0"
OptimizeReferences="2"
EnableCOMDATFolding="2"
EntryPointSymbol=""
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libzlib1.lib comctl32.lib winmm.lib"
OutputFile="$(OutDir)/Plainamp.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="Lib"
GenerateDebugInformation="false"
SubSystem="0"
OptimizeReferences="2"
EnableCOMDATFolding="2"
EntryPointSymbol=""
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -34,7 +34,7 @@ const TCHAR * SECTION = TEXT( "Plainamp" );
ConfVar::ConfVar( TCHAR * szKey, ConfMode mode )
{
// MessageBox( 0, TEXT( "no const @ ConfVar" ), TEXT( "" ), 0 );
//wprintf("ConfVar::ConfVar(TCHAR) > Got <%s>\n", szKey);
//Console::Print("ConfVar::ConfVar(TCHAR) > Got <%s>\n", szKey);
// Init
const int iLen = ( int )_tcslen( szKey );
@ -59,7 +59,7 @@ ConfVar::ConfVar( TCHAR * szKey, ConfMode mode )
////////////////////////////////////////////////////////////////////////////////
ConfVar::ConfVar( const TCHAR * szKey, ConfMode mode )
{
//wprintf("ConfVar::ConfVar(const TCHAR) > Got <%s>\n", szKey);
//Console::Print("ConfVar::ConfVar(const TCHAR) > Got <%s>\n", szKey);
// Init
m_szKey = ( TCHAR * )szKey;
@ -73,7 +73,7 @@ ConfVar::ConfVar( const TCHAR * szKey, ConfMode mode )
if( !conf_map ) conf_map = new map<TCHAR *, ConfVar *>;
conf_map->insert( pair<TCHAR *, ConfVar *>( m_szKey, this ) );
//wprintf("ConfVar::ConfVar(const TCHAR) > Insert <%s>\n", ConfVar::m_szKey);
//Console::Print("ConfVar::ConfVar(const TCHAR) > Insert <%s>\n", ConfVar::m_szKey);
}
@ -96,7 +96,7 @@ ConfVar::~ConfVar()
ConfBool::ConfBool( bool * pbData, TCHAR * szKey, ConfMode mode, bool bDefault ) : ConfVar( szKey, mode )
{
// MessageBox( 0, TEXT( "no const @ ConfBool" ), TEXT( "" ), 0 );
//wprintf("ConfBool(TCHAR) > Get <%s>\n", szKey);
//Console::Print("ConfBool(TCHAR) > Get <%s>\n", szKey);
m_pbData = pbData;
m_bDefault = bDefault;
@ -112,7 +112,7 @@ ConfBool::ConfBool( bool * pbData, TCHAR * szKey, ConfMode mode, bool bDefault )
////////////////////////////////////////////////////////////////////////////////
ConfBool::ConfBool( bool * pbData, const TCHAR * szKey, ConfMode mode, bool bDefault ) : ConfVar( szKey, mode )
{
//wprintf("ConfBool(TCHAR) > Get <%s>\n", szKey);
//Console::Print("ConfBool(TCHAR) > Get <%s>\n", szKey);
m_pbData = pbData;
m_bDefault = bDefault;
@ -127,7 +127,7 @@ ConfBool::ConfBool( bool * pbData, const TCHAR * szKey, ConfMode mode, bool bDef
////////////////////////////////////////////////////////////////////////////////
void ConfBool::Read()
{
//wprintf("ConfBool::Read() > Begin <m_bRead:%i> and <szIniPath:%s>\n", m_bRead, szIniPath);
//Console::Print("ConfBool::Read() > Begin <m_bRead:%i> and <szIniPath:%s>\n", m_bRead, szIniPath);
if( m_bRead || !szIniPath ) return;
@ -507,13 +507,13 @@ ConfString::ConfString( TCHAR * szData, const TCHAR * szKey, ConfMode mode, TCHA
////////////////////////////////////////////////////////////////////////////////
void ConfString::Read()
{
//wprintf( "ConfString::Read() > Begin\n");
//Console::Print( "ConfString::Read() > Begin\n");
if( m_bRead || !szIniPath ) return;
GetPrivateProfileString( SECTION, m_szKey, m_szDefault, m_szData, m_iMaxLen, szIniPath );
//wprintf( "ConfString::Read() > GetPrivateProfileString <%s> <%s> <%s>\n", m_szKey, m_szData, szIniPath);
//Console::Print( "ConfString::Read() > GetPrivateProfileString <%s> <%s> <%s>\n", m_szKey, m_szData, szIniPath);
m_bRead = true;
}
@ -567,7 +567,7 @@ void ConfCurDir::Read()
// Apply
//SetCurrentDirectory( m_szData );
//wprintf("ConfCurDir::Read > End <%s>\n", m_szData);
//Console::Print("ConfCurDir::Read > End <%s>\n", m_szData);
}
// ==============================================================================
@ -581,7 +581,7 @@ void ConfCurDir::Write()
GetCurrentDirectory( MAX_PATH, m_szData ); // Note: without trailing slash
// MessageBox( 0, m_szData, TEXT( "CurDir" ), 0 );
//wprintf("ConfCurDir::Read <%s>\n", m_szData);
//Console::Print("ConfCurDir::Read <%s>\n", m_szData);
ConfString::Write();
}
@ -645,7 +645,7 @@ void Conf::Init()
//_sntprintf( szIniPath, _MAX_PATH, TEXT( "%s%s%s" ), szDrive, szDir, fd.cFileName );
_sntprintf( szIniPath, _MAX_PATH, TEXT( "%s%s%s" ), szDrive, szDir, TEXT( "Plainamp.ini" ) );
wprintf("DLL > We got the ini path <%s>\n", szIniPath);
Console::Print("DLL > Ini path <%s>\n", szIniPath);
// =======================================================================================

View File

@ -22,7 +22,7 @@
//////////////////////////////////////////////////////////////////////////////////////////
// Include
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#include "../../Common/Src/Console.h" // Local common
#include "../../../../Source/Core/Common/Src/ConsoleWindow.h" // Global common
/////////////////////////

View File

@ -37,7 +37,7 @@ InputPlugin::InputPlugin( TCHAR * szDllpath, bool bKeepLoaded ) : Plugin( szDllp
iFiltersLen = 0;
plugin = NULL;
//wprintf("\InputPlugin::InputPlugin > Begin\n");
//Console::Print("\InputPlugin::InputPlugin > Begin\n");
if( !Load() )
{

View File

@ -371,7 +371,7 @@ LRESULT CALLBACK WndprocMain( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
static bool bRemoveIcon = false;
#ifdef NOGUI
//wprintf("DLL > Main.cpp:WndprocMain() was called. But nothing will be done. \n");
//Console::Print("DLL > Main.cpp:WndprocMain() was called. But nothing will be done. \n");
#else
Console::Append( TEXT( "Main.cpp:WndprocMain was called" ) );
#endif

View File

@ -266,7 +266,7 @@ void Output_SetVolume( int volume )
//_stprintf( szBuffer, TEXT( "DLL > Output_SetVolume <%i>" ), volume );
//Console::Append( szBuffer );
//Console::Append( TEXT( " " ) );
//wprintf( "DLL > Output_SetVolume <%i>\n", volume );
//Console::Print( "DLL > Output_SetVolume <%i>\n", volume );
// =======================================================================================
for( int i = 0; i < active_output_count; i++ )

View File

@ -248,7 +248,7 @@ bool OutputPlugin::Config( HWND hParent )
////////////////////////////////////////////////////////////////////////////////
bool OutputPlugin::Start()
{
//wprintf( "OutputPlugin::Start() > Begin <IsLoaded():%i> <bActive:%i> <active_output_count:%i>\n",
//Console::Print( "OutputPlugin::Start() > Begin <IsLoaded():%i> <bActive:%i> <active_output_count:%i>\n",
// IsLoaded(), bActive, active_output_count );
if( !IsLoaded() ) return false;
@ -275,7 +275,7 @@ bool OutputPlugin::Start()
Console::Append( szBuffer );
Console::Append( TEXT( " " ) );
#else
wprintf( "\n >>> Output plugin '%s' activated\n\n" , GetFilename() );
Console::Print( "\n >>> Output plugin '%s' activated\n\n" , GetFilename() );
#endif
bActive = true;

View File

@ -60,14 +60,14 @@ void EnableTimer( bool bEnabled )
if( bEnabled )
{
SetTimer( WindowMain, TIMER_SEEK_UPDATE, 1000, NULL );
wprintf( "EnableTimer > Activated\n" );
Console::Print( "EnableTimer > Activated\n" );
}
else
{
KillTimer( WindowMain, TIMER_SEEK_UPDATE );
StatusReset();
wprintf( "EnableTimer > Killed\n" );
Console::Print( "EnableTimer > Killed\n" );
}
bTimerRunning = bEnabled;
@ -82,7 +82,7 @@ bool OpenPlay( TCHAR * szFilename, int iNumber )
{
// =======================================================================================
#ifdef NOGUI
//wprintf( "Playback.cpp: OpenPlay > Begin <%i> <%s>\n" , iNumber, szFilename );
//Console::Print( "Playback.cpp: OpenPlay > Begin <%i> <%s>\n" , iNumber, szFilename );
#else
TCHAR sszBuffer[ 5000 ];
_stprintf( sszBuffer, TEXT( "Playback.cpp: OpenPlay was called <%i> <%s>" ), iNumber, szFilename );
@ -121,14 +121,14 @@ bool OpenPlay( TCHAR * szFilename, int iNumber )
{
Console::Append( TEXT( "ERROR: Extension not supported" ) );
Console::Append( " " );
wprintf("OpenPlay > ERROR: Extension not supported\n");
Console::Print("OpenPlay > ERROR: Extension not supported\n");
return false;
}
// ---------------------------------------------------------------------------------------
// Now that we know which input pugin to use we set that one as active
InputPlugin * old_input = active_input_plugin; // Save the last one, if any
active_input_plugin = iter->second;
wprintf("OpenPlay > Input plugin '%s' activated\n", active_input_plugin->GetFilename());
Console::Print("OpenPlay > Input plugin '%s' activated\n", active_input_plugin->GetFilename());
// =======================================================================================
if( old_input )
@ -145,12 +145,12 @@ bool OpenPlay( TCHAR * szFilename, int iNumber )
{
Console::Append( TEXT( "ERROR: Input plugin is NULL" ) );
Console::Append( " " );
wprintf("OpenPlay > ERROR: Input plugin is NULL\n");
Console::Print("OpenPlay > ERROR: Input plugin is NULL\n");
return false;
}
// Connect
//wprintf( "OpenPlay > OutMod\n" );
//Console::Print( "OpenPlay > OutMod\n" );
active_input_plugin->plugin->outMod = &output_server; // output->plugin;
// =======================================================================================
@ -190,10 +190,10 @@ bool OpenPlay( TCHAR * szFilename, int iNumber )
TCHAR szTitle[ 2000 ] = TEXT( "\0" );
int length_in_ms;
//wprintf( "OpenPlay > GetFileInfo\n" );
//Console::Print( "OpenPlay > GetFileInfo\n" );
active_input_plugin->plugin->GetFileInfo( szFilename, szTitle, &length_in_ms );
//wprintf( "OpenPlay > Play\n" );
//Console::Print( "OpenPlay > Play\n" );
active_input_plugin->plugin->Play( szFilename );
// =======================================================================================
#endif
@ -218,7 +218,7 @@ bool OpenPlay( TCHAR * szFilename, int iNumber )
// Timer ON
//EnableTimer( true );
//wprintf( "OpenPlay > End\n" );
//Console::Print( "OpenPlay > End\n" );
return true;
}
@ -298,7 +298,7 @@ bool Playback::Play()
Console::Append( sszBuffer );
Console::Append( TEXT( " " ) );
#else
//wprintf( "Playback::Play() > Begin <%i>\n" , bPlaying );
//Console::Print( "Playback::Play() > Begin <%i>\n" , bPlaying );
#endif
// ---------------------------------------------------------------------------------------
@ -393,7 +393,7 @@ bool Playback::Play()
Console::Append( szBuffer );
//Console::Append( TEXT( " " ) );
#else
//wprintf( "Playback::Play() > Filename <%s>\n", szFilename);
//Console::Print( "Playback::Play() > Filename <%s>\n", szFilename);
#endif
// Play

View File

@ -125,8 +125,9 @@ void Player_Main(bool Console)
//MessageBox(0, "main() opened", "", 0);
//printf( "main() opened\n" );
wprintf( "\n=========================================================\n\n" );
wprintf( "DLL > Player_Main() > Begin\n" );
Console::Print( "\n=========================================================\n\n\n" );
//Console::Print( "DLL > Player_Main() > Begin\n" );
Console::Print( "DLL > Settings:\n", bLoop);
// =======================================================================================
@ -135,9 +136,9 @@ void Player_Main(bool Console)
Conf::Init( );
// ---------------------------------------------------------------------------------------
wprintf( "\n\nDLL > Settings:\n", bLoop);
wprintf( "DLL > Loop: %i\n", bLoop);
wprintf( "DLL > WarnPluginsMissing: %i\n", bWarnPluginsMissing);
Console::Print( "DLL > Loop: %i\n", bLoop);
Console::Print( "DLL > WarnPluginsMissing: %i\n", bWarnPluginsMissing);
// ---------------------------------------------------------------------------------------
// =======================================================================================
@ -169,7 +170,7 @@ void Player_Main(bool Console)
memcpy( szPluginDir, szHomeDir, iHomeDirLen * sizeof( TCHAR ) );
memcpy( szPluginDir + iHomeDirLen, TEXT( "PluginsMusic" ), 12 * sizeof( TCHAR ) );
szPluginDir[ iHomeDirLen + 12 ] = TEXT( '\0' );
wprintf("DLL > Plugindir: %s\n", szPluginDir);
Console::Print("DLL > Plugindir: %s\n", szPluginDir);
// =======================================================================================
#ifndef NOGUI
Font::Create();
@ -182,7 +183,7 @@ void Player_Main(bool Console)
//GlobalVolume = Playback::Volume::Get(); // Don't bother with this for now
//GlobalCurrentVolume = GlobalVolume;
//Output_SetVolume( GlobalVolume );
wprintf("DLL > Volume: %i\n\n", GlobalVolume);
Console::Print("DLL > Volume: %i\n\n", GlobalVolume);
// ---------------------------------------------------------------------------------------
@ -205,10 +206,10 @@ void Player_Main(bool Console)
Plugin::FindAll<DspPlugin> ( szPluginDir, TEXT( "dsp_*.dll" ), false );
Plugin::FindAll<GenPlugin> ( szPluginDir, TEXT( "gen_*.dll" ), true );
//wprintf( "Winmain.cpp > PluginManager::Fill()\n" );
//Console::Print( "Winmain.cpp > PluginManager::Fill()\n" );
PluginManager::Fill();
//wprintf( "Winmain.cpp > PluginManager::Fill()\n" );
//Console::Print( "Winmain.cpp > PluginManager::Fill()\n" );
@ -250,26 +251,26 @@ void Player_Main(bool Console)
// Check the plugins
if( input_plugins.empty() )
{
wprintf("\n *** Warning: No valid input plugins found\n\n");
Console::Print("\n *** Warning: No valid input plugins found\n\n");
}
else
{
wprintf(" >>> These valid input plugins were found:\n");
Console::Print(" >>> These valid input plugins were found:\n");
for(int i = 0; i < input_plugins.size(); i++)
wprintf(" %i: %s\n", (i + 1), input_plugins.at(i)->GetFilename());
wprintf("\n");
Console::Print(" %i: %s\n", (i + 1), input_plugins.at(i)->GetFilename());
Console::Print("\n");
}
// The input plugins are never activated here, they are activate for each file
if( !active_input_plugin || !active_input_plugin->plugin )
{
// wprintf("The input plugin is not activated yet\n");
// Console::Print("The input plugin is not activated yet\n");
}
else
{
//const int ms_len = active_input_plugin->plugin->GetLength();
//const int ms_cur = active_input_plugin->plugin->GetOutputTime();
//wprintf("We are at <%i of %i>\n", ms_cur, ms_len);
//Console::Print("We are at <%i of %i>\n", ms_cur, ms_len);
}
// ---------------------------------------------------------------------------------------
if( active_output_count > 0 )
@ -280,11 +281,11 @@ void Player_Main(bool Console)
{
res_temp = active_output_plugins[ i ]->plugin->GetOutputTime();
}
wprintf("Playback progress <%i>\n", res_temp);*/
Console::Print("Playback progress <%i>\n", res_temp);*/
}
else
{
wprintf("\n *** Warning: The output plugin is not working\n\n");
Console::Print("\n *** Warning: The output plugin is not working\n\n");
}
// =======================================================================================
@ -292,14 +293,14 @@ void Player_Main(bool Console)
// Start the timer
if(!TimerCreated && bLoop) // Only create this the first time
{
//wprintf("Created the timer\n");
//Console::Print("Created the timer\n");
MakeTime();
TimerCreated = true;
}
// =======================================================================================
wprintf( "\n=========================================================\n\n" );
//wprintf( "DLL > main_dll() > End\n\n\n" );
Console::Print( "\n=========================================================\n\n" );
//Console::Print( "DLL > main_dll() > End\n\n\n" );
//std::cin.get();
}
@ -376,4 +377,4 @@ void close()
//return 0;
}
// =======================================================================================
// =======================================================================================

View File

@ -4,9 +4,10 @@
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#include <iostream> // System
#include "../../../../Source/Core/Common/Src/Common.h" // Global common
#include "Common.h" // Global common
#include "ConsoleWindow.h"
#include "../../Common/Src/Console.h" // Local common
//#include "../../Common/Src/Console.h" // Local common
#include "OutputPlugin.h" // Local
#include "Playback.h"
@ -30,7 +31,7 @@ bool Initialized = false;
// -------------------------
/* We keep the file in the playlist, even though we currently only every have one file here
/* We keep the file in the playlist, even though we currently only ever have one file here
at a time */
// ---------
void AddFileToPlaylist(char * a)
@ -59,21 +60,21 @@ void AddFileToPlaylist(char * a)
void Player_Play(char * FileName)
{
wprintf("Play file <%s>\n", FileName);
Console::Print("Play file <%s>\n", FileName);
// Check if the file exists
if(GetFileAttributes(FileName) == INVALID_FILE_ATTRIBUTES)
{
wprintf("Warning: The file <%s> does not exist. Something is wrong.\n", FileName);
Console::Print("Warning: The file <%s> does not exist. Something is wrong.\n", FileName);
return;
}
Playback::Stop();
//wprintf("Stop\n");
//Console::Print("Stop\n");
playlist->RemoveAll();
//wprintf("RemoveAll\n");
//Console::Print("RemoveAll\n");
AddFileToPlaylist(FileName);
//wprintf("addfiletoplaylist\n");
//Console::Print("addfiletoplaylist\n");
// Play the file
Playback::Play();
@ -83,7 +84,7 @@ void Player_Play(char * FileName)
// ---------------------------------------------------------------------------------------
// Set volume. This must probably be done after the dll is loaded.
//Output_SetVolume( Playback::Volume::Get() );
//wprintf("Volume(%i)\n", Playback::Volume::Get());
//Console::Print("Volume(%i)\n", Playback::Volume::Get());
// ---------------------------------------------------------------------------------------
GlobalPause = false;
@ -92,7 +93,7 @@ void Player_Play(char * FileName)
void Player_Stop()
{
Playback::Stop();
//wprintf("Stop\n");
//Console::Print("Stop\n");
playlist->RemoveAll();
CurrentlyPlayingFile = "";
@ -105,13 +106,13 @@ void Player_Pause()
{
if (!GlobalPause)
{
wprintf("DLL > Pause\n");
Console::Print("DLL > Pause\n");
Playback::Pause();
GlobalPause = true;
}
else
{
wprintf("DLL > UnPause from Pause\n");
Console::Print("DLL > UnPause from Pause\n");
Player_Unpause();
GlobalPause = false;
}
@ -119,7 +120,7 @@ void Player_Pause()
void Player_Unpause()
{
wprintf("DLL > UnPause\n");
Console::Print("DLL > UnPause\n");
Playback::Play();
GlobalPause = false;
}
@ -135,7 +136,7 @@ void Player_Unpause()
void Player_Mute(int Vol)
{
if(GlobalVolume == -1) GlobalVolume = Vol;
wprintf("DLL > Mute <%i> <%i>\n", GlobalVolume, GlobalMute);
Console::Print("DLL > Mute <%i> <%i>\n", GlobalVolume, GlobalMute);
GlobalMute = !GlobalMute;
@ -143,15 +144,15 @@ void Player_Mute(int Vol)
if(GlobalMute)
{
Output_SetVolume( 0 );
wprintf("DLL > Volume <%i>\n", GlobalMute);
Console::Print("DLL > Volume <%i>\n", GlobalMute);
}
else
{
Output_SetVolume( GlobalVolume );
wprintf("DLL > Volume <%i>\n", GlobalMute);
Console::Print("DLL > Volume <%i>\n", GlobalMute);
}
//wprintf("Volume(%i)\n", Playback::Volume::Get());
//Console::Print("Volume(%i)\n", Playback::Volume::Get());
}
///////////////////////////////////////
@ -160,12 +161,12 @@ void Player_Volume(int Vol)
{
GlobalVolume = Vol;
Output_SetVolume( GlobalVolume );
//wprintf("DLL > Volume <%i> <%i>\n", GlobalVolume, GlobalCurrentVolume);
//Console::Print("DLL > Volume <%i> <%i>\n", GlobalVolume, GlobalCurrentVolume);
}
void ShowConsole()
{
StartConsoleWin(100, 2000, "MusicMod"); // give room for 2000 rows
Console::Open(100, 2000, "MusicMod", true); // give room for 2000 rows
}
@ -177,4 +178,4 @@ void Player_Console(bool Console)
#if defined (_WIN32)
FreeConsole();
#endif
}
}

View File

@ -105,7 +105,7 @@ public:
if( 0 > iIndex || iIndex >= ( int )_database.size() )
{
wprintf("SetCurIndex > Return");
Console::Print("SetCurIndex > Return");
return;
}

View File

@ -48,7 +48,7 @@ extern bool GlobalPause;
void CALLBACK Update(unsigned int,unsigned int,unsigned long,unsigned long,unsigned long)
#endif
{
//wprintf("DLL > Update() > Begin (%i)\n", active_input_plugin);
//Console::Print("DLL > Update() > Begin (%i)\n", active_input_plugin);
// --------------------------------
// Manage restart when playback for a file has reached the end of the file
@ -56,7 +56,7 @@ extern bool GlobalPause;
// Check if the input plugin is activated
if(!active_input_plugin || !active_input_plugin->plugin)
{
//wprintf("The input plugin is not activated yet\n");
//Console::Print("The input plugin is not activated yet\n");
}
else
{
@ -73,20 +73,20 @@ extern bool GlobalPause;
if ( progress > 0.7 ) // Only show this if we are getting close to the end, for bugtesting
// basically
{
//wprintf("Playback progress <%i of %i>\n", ms_cur, ms_len);
//Console::Print("Playback progress <%i of %i>\n", ms_cur, ms_len);
}
// Because cur never go all the way to len we can't use a == comparison. Insted of this
// we could also check if the location is the same as right before.
if(ms_cur > ms_len - 1000 && !GlobalPause) // avoid restarting in cases where we just pressed pause
{
wprintf("Restart <%s>\n", CurrentlyPlayingFile.c_str());
Console::Print("Restart <%s>\n", CurrentlyPlayingFile.c_str());
Player_Play((char *)CurrentlyPlayingFile.c_str());
}
}
// --------------
//wprintf("Make new time\n");
//Console::Print("Make new time\n");
MakeTime(); // Make a new one
}
@ -119,8 +119,8 @@ int MainTimer()
// cout << ".";
//}
//wprintf("MakeTime\n");
//Console::Print("MakeTime\n");
return 0;
}
///////////////////////////
///////////////////////////

View File

@ -265,6 +265,130 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>