mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Some code cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2768 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -51,12 +51,12 @@
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@ -124,12 +124,12 @@
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="false"
|
||||
FloatingPointModel="0"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@ -191,18 +191,18 @@
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="2"
|
||||
AdditionalIncludeDirectories="../../PluginSpecs"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
FloatingPointModel="0"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@ -265,18 +265,18 @@
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories="../../PluginSpecs"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;WIN32_LEAN_AND_MEAN"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableEnhancedInstructionSet="0"
|
||||
FloatingPointModel="0"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@ -337,16 +337,16 @@
|
||||
Optimization="3"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories="../../PluginSpecs"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;WIN32_LEAN_AND_MEAN"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@ -408,15 +408,15 @@
|
||||
Optimization="3"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories="../../PluginSpecs"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;WIN32_LEAN_AND_MEAN"
|
||||
RuntimeLibrary="0"
|
||||
FloatingPointModel="0"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@ -720,62 +720,6 @@
|
||||
RelativePath=".\Src\Setup.h"
|
||||
>
|
||||
</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>
|
||||
<File
|
||||
RelativePath=".\Src\StringUtil.cpp"
|
||||
>
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _JIT_ABI_H
|
||||
#define _JIT_ABI_H
|
||||
#ifndef _JIT_ABI_H_
|
||||
#define _JIT_ABI_H_
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
@ -74,10 +74,10 @@
|
||||
#define ABI_PARAM5 R8
|
||||
#define ABI_PARAM6 R9
|
||||
|
||||
#endif
|
||||
#endif // WIN32
|
||||
|
||||
#endif
|
||||
#endif // X86
|
||||
|
||||
#endif // _JIT_ABI_H
|
||||
#endif // _JIT_ABI_H_
|
||||
|
||||
|
||||
|
@ -1,12 +1,9 @@
|
||||
/* Most of the code in this file was shamelessly ripped from libcdio
|
||||
With minor adjustments */
|
||||
// Most of the code in this file was shamelessly ripped from libcdio With minor adjustments
|
||||
|
||||
#include "CDUtils.h"
|
||||
#include "Common.h"
|
||||
|
||||
/*!
|
||||
Follow symlinks until we have the real device file
|
||||
(idea taken from libunieject).
|
||||
*/
|
||||
// Follow symlinks until we have the real device file (idea taken from libunieject).
|
||||
void cdio_follow_symlink(const char * src, char * dst) {
|
||||
#ifndef _WIN32
|
||||
char tmp_src[PATH_MAX+1];
|
||||
@ -32,10 +29,9 @@ void cdio_follow_symlink(const char * src, char * dst) {
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
Add/allocate a drive to the end of drives.
|
||||
Use cdio_free_device_list() to free this device_list.
|
||||
*/
|
||||
|
||||
// Add/allocate a drive to the end of drives.
|
||||
// Use cdio_free_device_list() to free this device_list.
|
||||
void cdio_add_device_list(char **device_list[], const char *drive,
|
||||
unsigned int *num_drives) {
|
||||
if (NULL != drive) {
|
||||
@ -53,7 +49,7 @@ void cdio_add_device_list(char **device_list[], const char *drive,
|
||||
/* Drive not in list. Add it. */
|
||||
(*num_drives)++;
|
||||
*device_list = (char **)realloc(*device_list, (*num_drives) * sizeof(char *));
|
||||
(*device_list)[*num_drives-1] = strdup(drive);
|
||||
(*device_list)[*num_drives-1] = __strdup(drive);
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -67,10 +63,8 @@ void cdio_add_device_list(char **device_list[], const char *drive,
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Free device list returned by cdio_get_devices or
|
||||
cdio_get_devices_with_cap.
|
||||
*/
|
||||
// Free device list returned by cdio_get_devices or
|
||||
// cdio_get_devices_with_cap.
|
||||
void cdio_free_device_list(char * ppsz_device_list[]) {
|
||||
char **ppsz_device_list_save=ppsz_device_list;
|
||||
if (!ppsz_device_list) return;
|
||||
@ -83,10 +77,8 @@ void cdio_free_device_list(char * ppsz_device_list[]) {
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
Returns a string that can be used in a CreateFile call if
|
||||
c_drive letter is a character. If not NULL is returned.
|
||||
*/
|
||||
// Returns a string that can be used in a CreateFile call if
|
||||
// c_drive letter is a character. If not NULL is returned.
|
||||
const char *is_cdrom_win32(const char c_drive_letter) {
|
||||
|
||||
UINT uDriveType;
|
||||
@ -103,7 +95,7 @@ const char *is_cdrom_win32(const char c_drive_letter) {
|
||||
case DRIVE_CDROM: {
|
||||
char sz_win32_drive_full[] = "\\\\.\\X:";
|
||||
sz_win32_drive_full[4] = c_drive_letter;
|
||||
return strdup(&sz_win32_drive_full[4]);
|
||||
return __strdup(&sz_win32_drive_full[4]);
|
||||
}
|
||||
default:
|
||||
//cdio_debug("Drive %c is not a CD-ROM", c_drive_letter);
|
||||
@ -111,17 +103,14 @@ const char *is_cdrom_win32(const char c_drive_letter) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Returns a pointer to an array of strings with the device names
|
||||
*/
|
||||
// Returns a pointer to an array of strings with the device names
|
||||
char ** cdio_get_devices_win32() {
|
||||
char **drives = NULL;
|
||||
unsigned int num_drives=0;
|
||||
char drive_letter;
|
||||
|
||||
/* Scan the system for CD-ROM drives.
|
||||
Not always 100% reliable, so use the USE_MNTENT code above first.
|
||||
*/
|
||||
// Scan the system for CD-ROM drives.
|
||||
// Not always 100% reliable, so use the USE_MNTENT code above first.
|
||||
for (drive_letter='A'; drive_letter <= 'Z'; drive_letter++) {
|
||||
const char *drive_str=is_cdrom_win32(drive_letter);
|
||||
if (drive_str != NULL) {
|
||||
@ -305,7 +294,7 @@ static char *check_mounts_linux(const char *mtab)
|
||||
tmp = strstr(mntent->mnt_opts, "fs=");
|
||||
if ( tmp ) {
|
||||
free(mnt_type);
|
||||
mnt_type = strdup(tmp + strlen("fs="));
|
||||
mnt_type = __strdup(tmp + strlen("fs="));
|
||||
if ( mnt_type ) {
|
||||
tmp = strchr(mnt_type, ',');
|
||||
if ( tmp ) {
|
||||
@ -316,7 +305,7 @@ static char *check_mounts_linux(const char *mtab)
|
||||
tmp = strstr(mntent->mnt_opts, "dev=");
|
||||
if ( tmp ) {
|
||||
free(mnt_dev);
|
||||
mnt_dev = strdup(tmp + strlen("dev="));
|
||||
mnt_dev = __strdup(tmp + strlen("dev="));
|
||||
if ( mnt_dev ) {
|
||||
tmp = strchr(mnt_dev, ',');
|
||||
if ( tmp ) {
|
||||
@ -340,9 +329,7 @@ static char *check_mounts_linux(const char *mtab)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
Returns a pointer to an array of strings with the device names
|
||||
*/
|
||||
// Returns a pointer to an array of strings with the device names
|
||||
char **cdio_get_devices_linux () {
|
||||
|
||||
unsigned int i;
|
||||
@ -351,8 +338,7 @@ char **cdio_get_devices_linux () {
|
||||
char **drives = NULL;
|
||||
unsigned int num_drives=0;
|
||||
|
||||
/* Scan the system for CD-ROM drives.
|
||||
*/
|
||||
// Scan the system for CD-ROM drives.
|
||||
for ( i=0; strlen(checklist1[i]) > 0; ++i ) {
|
||||
sprintf(drive, "/dev/%s", checklist1[i]);
|
||||
if ( is_cdrom_linux(drive, NULL) > 0 ) {
|
||||
@ -372,9 +358,8 @@ char **cdio_get_devices_linux () {
|
||||
free(ret_drive);
|
||||
}
|
||||
|
||||
/* Scan the system for CD-ROM drives.
|
||||
Not always 100% reliable, so use the USE_MNTENT code above first.
|
||||
*/
|
||||
// Scan the system for CD-ROM drives.
|
||||
// Not always 100% reliable, so use the USE_MNTENT code above first.
|
||||
for ( i=0; checklist2[i].format; ++i ) {
|
||||
unsigned int j;
|
||||
for ( j=checklist2[i].num_min; j<=checklist2[i].num_max; ++j ) {
|
||||
@ -389,9 +374,7 @@ char **cdio_get_devices_linux () {
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
Returns a pointer to an array of strings with the device names
|
||||
*/
|
||||
// Returns a pointer to an array of strings with the device names
|
||||
char **cdio_get_devices() {
|
||||
#ifdef _WIN32
|
||||
return cdio_get_devices_win32();
|
||||
@ -405,9 +388,9 @@ char **cdio_get_devices() {
|
||||
}
|
||||
|
||||
// Need to be tested, does calling this function twice cause any damage?
|
||||
/*
|
||||
Returns true if device is cdrom/dvd
|
||||
*/
|
||||
|
||||
// Returns true if device is cdrom/dvd
|
||||
|
||||
bool cdio_is_cdrom(const char *device) {
|
||||
char **devices = cdio_get_devices();
|
||||
bool res = false;
|
||||
@ -421,7 +404,9 @@ bool cdio_is_cdrom(const char *device) {
|
||||
cdio_free_device_list(devices);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Can we remove this?
|
||||
/*
|
||||
int main() {
|
||||
char** res = cdio_get_devices();
|
||||
|
@ -1,15 +1,16 @@
|
||||
#ifndef CDUTILS_H
|
||||
#define CDUTILS_H
|
||||
#ifndef _CDUTILS_H_
|
||||
#define _CDUTILS_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "windows.h"
|
||||
#include <windows.h>
|
||||
#define PATH_MAX MAX_PATH
|
||||
|
||||
#elif __APPLE__
|
||||
#include <paths.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <IOKit/IOKitLib.h>
|
||||
#include <IOKit/storage/IOCDMedia.h>
|
||||
@ -17,16 +18,10 @@
|
||||
#include <IOKit/IOBSD.h>
|
||||
|
||||
#elif __linux__
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <mntent.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
@ -34,20 +29,14 @@
|
||||
#include <linux/cdrom.h>
|
||||
#endif // WIN32
|
||||
|
||||
/*
|
||||
Returns a pointer to an array of strings with the device names
|
||||
*/
|
||||
// Returns a pointer to an array of strings with the device names
|
||||
char **cdio_get_devices();
|
||||
|
||||
/*!
|
||||
Free device list returned by cdio_get_devices or
|
||||
cdio_get_devices_with_cap.
|
||||
*/
|
||||
// Free device list returned by cdio_get_devices or
|
||||
// cdio_get_devices_with_cap.
|
||||
void cdio_free_device_list(char * ppsz_device_list[]);
|
||||
|
||||
/*
|
||||
Returns true if device is cdrom/dvd
|
||||
*/
|
||||
// Returns true if device is cdrom/dvd
|
||||
bool cdio_is_cdrom(const char *device);
|
||||
|
||||
#endif // CDUTILS_H
|
||||
#endif // _CDUTILS_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -16,8 +16,8 @@
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
// Detect the cpu, so we'll know which optimizations to use
|
||||
#ifndef _CPUDETECT_H
|
||||
#define _CPUDETECT_H
|
||||
#ifndef _CPUDETECT_H_
|
||||
#define _CPUDETECT_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -62,4 +62,4 @@ struct CPUInfo
|
||||
|
||||
extern CPUInfo cpu_info;
|
||||
|
||||
#endif
|
||||
#endif // _CPUDETECT_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _POINTERWRAP_H
|
||||
#define _POINTERWRAP_H
|
||||
#ifndef _POINTERWRAP_H_
|
||||
#define _POINTERWRAP_H_
|
||||
|
||||
// Extremely simple serialization framework.
|
||||
|
||||
@ -271,4 +271,4 @@ private:
|
||||
};
|
||||
};
|
||||
|
||||
#endif // _POINTERWRAP_H
|
||||
#endif // _POINTERWRAP_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _COLORUTIL_H
|
||||
#define _COLORUTIL_H
|
||||
#ifndef _COLORUTIL_H_
|
||||
#define _COLORUTIL_H_
|
||||
|
||||
namespace ColorUtil
|
||||
{
|
||||
@ -25,4 +25,4 @@ u32 Decode5A3(u16 val);
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
#endif // _COLORUTIL_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _COMMON_H
|
||||
#define _COMMON_H
|
||||
#ifndef _COMMON_H_
|
||||
#define _COMMON_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -40,6 +40,15 @@
|
||||
#include "CommonPaths.h"
|
||||
#include "CommonFuncs.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define __strdup _strdup
|
||||
#define __getcwd _getcwd
|
||||
#define __chdir _chdir
|
||||
#else
|
||||
#define __strdup strdup
|
||||
#define __getcwd getcwd
|
||||
#define __chdir chdir
|
||||
#endif
|
||||
|
||||
// Darwin ABI requires that stack frames be aligned to 16-byte boundaries.
|
||||
// This probably wouldn't break anyone either, but hey
|
||||
@ -50,7 +59,6 @@
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
// Check MSC ver
|
||||
#if !defined _MSC_VER || _MSC_VER <= 1000
|
||||
#error needs at least version 1000 of MSC
|
||||
@ -124,4 +132,4 @@ namespace
|
||||
TypeName(const TypeName&); \
|
||||
void operator=(const TypeName&)
|
||||
|
||||
#endif // COMMON_H
|
||||
#endif // _COMMON_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef COMMONFUNCS_H
|
||||
#define COMMONFUNCS_H
|
||||
#ifndef _COMMONFUNCS_H_
|
||||
#define _COMMONFUNCS_H_
|
||||
|
||||
#ifdef _WIN32
|
||||
#define SLEEP(x) Sleep(x)
|
||||
@ -111,6 +111,6 @@ inline u16 swap16(const u8* _pData) {return swap16(*(const u16*)_pData);}
|
||||
inline u32 swap32(const u8* _pData) {return swap32(*(const u32*)_pData);}
|
||||
inline u64 swap64(const u8* _pData) {return swap64(*(const u64*)_pData);}
|
||||
|
||||
} // namespace Common
|
||||
} // Namespace Common
|
||||
|
||||
#endif // COMMONFUNCS
|
||||
#endif // _COMMONFUNCS_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef COMMON_PATHS_H
|
||||
#define COMMON_PATHS_H
|
||||
#ifndef _COMMON_PATHS_H_
|
||||
#define _COMMON_PATHS_H_
|
||||
|
||||
// Library suffix/prefix
|
||||
#ifdef _WIN32
|
||||
@ -165,4 +165,4 @@
|
||||
|
||||
#define FULL_WII_MENU_DIR FULL_WII_USER_DIR "title" DIR_SEP "00000001" DIR_SEP "00000002" DIR_SEP "content"
|
||||
|
||||
#endif // COMMON_PATHS_H
|
||||
#endif // _COMMON_PATHS_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -20,8 +20,8 @@
|
||||
// core and the plugin specs. Any definitions that are only used by the core
|
||||
// should be placed in "Common.h" instead.
|
||||
|
||||
#ifndef _COMMONTYPES_H
|
||||
#define _COMMONTYPES_H
|
||||
#ifndef _COMMONTYPES_H_
|
||||
#define _COMMONTYPES_H_
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
@ -55,4 +55,4 @@ typedef long long s64;
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
#endif // _COMMONTYPES_H
|
||||
#endif // _COMMONTYPES_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -40,7 +40,7 @@ ConsoleListener::~ConsoleListener()
|
||||
Close();
|
||||
}
|
||||
|
||||
//100, 100, "Dolphin Log Console"
|
||||
// 100, 100, "Dolphin Log Console"
|
||||
// Open console window - width and height is the size of console window
|
||||
// Name is the window title
|
||||
void ConsoleListener::Open(int width, int height, char *title)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -163,5 +163,3 @@ void* DynamicLibrary::Get(const char* funcname) const
|
||||
funcname);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _DYNAMICLIBRARY_H
|
||||
#define _DYNAMICLIBRARY_H
|
||||
#ifndef _DYNAMICLIBRARY_H_
|
||||
#define _DYNAMICLIBRARY_H_
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
@ -56,4 +56,4 @@ private:
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // DYNAMICLIBRARY
|
||||
#endif // _DYNAMICLIBRARY_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
// --------------------------------------------------------------------------------------
|
||||
//
|
||||
// Written by Zoltan Csizmadia, zoltan_csizmadia@yahoo.com
|
||||
// For companies(Austin,TX): If you would like to get my resume, send an email.
|
||||
@ -10,14 +10,7 @@
|
||||
// 1.1 WhineCube version Masken
|
||||
// 1.2 Dolphin version Masken
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ExtendedTrace.cpp
|
||||
//
|
||||
|
||||
// Include StdAfx.h, if you're using precompiled
|
||||
// header through StdAfx.h
|
||||
//#include "stdafx.h"
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
#if defined(WIN32)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
// -----------------------------------------------------------------------------------------
|
||||
//
|
||||
// Written by Zoltan Csizmadia, zoltan_csizmadia@yahoo.com
|
||||
// For companies(Austin,TX): If you would like to get my resume, send an email.
|
||||
@ -10,13 +10,10 @@
|
||||
// 1.1 WhineCube version Masken
|
||||
// 1.2 Dolphin version Masken
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ExtendedTrace.h
|
||||
//
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
#ifndef EXTENDEDTRACE_H_INCLUDED
|
||||
#define EXTENDEDTRACE_H_INCLUDED
|
||||
#ifndef _EXTENDEDTRACE_H_INCLUDED_
|
||||
#define _EXTENDEDTRACE_H_INCLUDED_
|
||||
|
||||
#if defined(WIN32)
|
||||
|
||||
@ -31,26 +28,26 @@
|
||||
#define EXTENDEDTRACEUNINITIALIZE() UninitSymInfo()
|
||||
#define STACKTRACE(file) StackTrace( GetCurrentThread(), _T(""), file)
|
||||
#define STACKTRACE2(file, eip, esp, ebp) StackTrace(GetCurrentThread(), _T(""), file, eip, esp, ebp)
|
||||
//class File;
|
||||
// class File;
|
||||
|
||||
BOOL InitSymInfo( PCSTR );
|
||||
BOOL UninitSymInfo();
|
||||
void StackTrace( HANDLE, LPCTSTR, FILE *file);
|
||||
void StackTrace( HANDLE, LPCTSTR, FILE *file, DWORD eip, DWORD esp, DWORD ebp);
|
||||
|
||||
//functions by Masken
|
||||
// functions by Masken
|
||||
void etfprintf(FILE *file, const char *format, ...);
|
||||
void etfprint(FILE *file, const std::string &text);
|
||||
#define UEFBUFSIZE 2048
|
||||
extern char g_uefbuf[UEFBUFSIZE];
|
||||
|
||||
#else //not WIN32
|
||||
#else // not WIN32
|
||||
|
||||
#define EXTENDEDTRACEINITIALIZE( IniSymbolPath ) ((void)0)
|
||||
#define EXTENDEDTRACEUNINITIALIZE() ((void)0)
|
||||
#define STACKTRACE(file) ((void)0)
|
||||
#define STACKTRACE2(file, eip, esp, ebp) ((void)0)
|
||||
|
||||
#endif //WIN32
|
||||
#endif // WIN32
|
||||
|
||||
#endif //EXTENDEDTRACE_H_INCLUDED
|
||||
#endif // _EXTENDEDTRACE_H_INCLUDED_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -115,5 +115,3 @@ const CFileSearch::XStringVector& CFileSearch::GetFileNames() const
|
||||
{
|
||||
return(m_FileNames);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef __FILESEARCH_H_
|
||||
#define __FILESEARCH_H_
|
||||
#ifndef _FILESEARCH_H_
|
||||
#define _FILESEARCH_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -40,5 +40,5 @@ class CFileSearch
|
||||
XStringVector m_FileNames;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // _FILESEARCH_H_
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -45,11 +45,10 @@
|
||||
#ifndef S_ISDIR
|
||||
#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
/*
|
||||
This namespace has various generic functions related to files and paths.
|
||||
The code still needs a ton of cleanup.
|
||||
REMEMBER: strdup considered harmful!
|
||||
*/
|
||||
|
||||
// This namespace has various generic functions related to files and paths.
|
||||
// The code still needs a ton of cleanup.
|
||||
// REMEMBER: strdup considered harmful!
|
||||
namespace File
|
||||
{
|
||||
|
||||
@ -70,7 +69,7 @@ bool Exists(const char *filename)
|
||||
{
|
||||
struct stat file_info;
|
||||
|
||||
char *copy = StripTailDirSlashes(strdup(filename));
|
||||
char *copy = StripTailDirSlashes(__strdup(filename));
|
||||
int result = stat(copy, &file_info);
|
||||
free(copy);
|
||||
|
||||
@ -82,7 +81,7 @@ bool IsDirectory(const char *filename)
|
||||
{
|
||||
struct stat file_info;
|
||||
|
||||
char *copy = StripTailDirSlashes(strdup(filename));
|
||||
char *copy = StripTailDirSlashes(__strdup(filename));
|
||||
|
||||
int result = stat(copy, &file_info);
|
||||
free(copy);
|
||||
@ -488,7 +487,7 @@ const char *GetCurrentDirectory()
|
||||
{
|
||||
const char *dir;
|
||||
// Get the current working directory (getcwd uses malloc)
|
||||
if (!(dir = getcwd(NULL, 0))) {
|
||||
if (!(dir = __getcwd(NULL, 0))) {
|
||||
|
||||
ERROR_LOG(COMMON, "GetCurrentDirectory failed: %s",
|
||||
GetLastErrorMsg());
|
||||
@ -500,7 +499,7 @@ const char *GetCurrentDirectory()
|
||||
// Sets the current directory to the given directory
|
||||
bool SetCurrentDirectory(const char *_rDirectory)
|
||||
{
|
||||
return chdir(_rDirectory) == 0;
|
||||
return __chdir(_rDirectory) == 0;
|
||||
}
|
||||
|
||||
#if defined(__APPLE__)
|
||||
@ -603,4 +602,3 @@ const char *GetUserDirectory()
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _FILEUTIL_H
|
||||
#define _FILEUTIL_H
|
||||
#ifndef _FILEUTIL_H_
|
||||
#define _FILEUTIL_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -24,9 +24,6 @@
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
/*
|
||||
This namespace has various generic functions related to files and paths.
|
||||
*/
|
||||
namespace File
|
||||
{
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _FIXED_SIZE_QUEUE_H
|
||||
#define _FIXED_SIZE_QUEUE_H
|
||||
#ifndef _FIXED_SIZE_QUEUE_H_
|
||||
#define _FIXED_SIZE_QUEUE_H_
|
||||
|
||||
// STL-look-a-like interface, but name is mixed case to distinguish it clearly from the
|
||||
// real STL classes.
|
||||
@ -83,5 +83,5 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // _FIXED_SIZE_QUEUE_H
|
||||
#endif // _FIXED_SIZE_QUEUE_H_
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -41,7 +41,7 @@ u32 HashFletcher(const u8* data_u8, size_t length)
|
||||
sum2 = (sum2 & 0xffff) + (sum2 >> 16);
|
||||
}
|
||||
|
||||
/* Second reduction step to reduce sums to 16 bits */
|
||||
// Second reduction step to reduce sums to 16 bits
|
||||
sum1 = (sum1 & 0xffff) + (sum1 >> 16);
|
||||
sum2 = (sum2 & 0xffff) + (sum2 >> 16);
|
||||
return(sum2 << 16 | sum1);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _HASH_H
|
||||
#define _HASH_H
|
||||
#ifndef _HASH_H_
|
||||
#define _HASH_H_
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
@ -25,4 +25,4 @@ u32 HashAdler32(const u8* data, size_t len); // Fairly accurate, slightl
|
||||
u32 HashFNV(const u8* ptr, int length); // Another fast and decent hash
|
||||
u32 HashEctor(const u8* ptr, int length); // JUNK. DO NOT USE FOR NEW THINGS
|
||||
|
||||
#endif
|
||||
#endif // _HASH_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -16,9 +16,6 @@
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
// see IniFile.h
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
// Include
|
||||
// ------------
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@ -30,24 +27,13 @@
|
||||
|
||||
#include "StringUtil.h"
|
||||
#include "IniFile.h"
|
||||
///////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
// Class
|
||||
// ------------
|
||||
IniFile::IniFile()
|
||||
{}
|
||||
|
||||
|
||||
IniFile::~IniFile()
|
||||
{}
|
||||
///////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
// Section functions used locally only
|
||||
// ------------
|
||||
Section::Section()
|
||||
: lines(), name(""), comment("") {}
|
||||
|
||||
@ -91,7 +77,6 @@ Section* IniFile::GetOrCreateSection(const char* sectionName)
|
||||
|
||||
return(section);
|
||||
}
|
||||
///////////////////////////////
|
||||
|
||||
|
||||
bool IniFile::DeleteSection(const char* sectionName)
|
||||
@ -115,7 +100,6 @@ bool IniFile::DeleteSection(const char* sectionName)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void IniFile::ParseLine(const std::string& line, std::string* keyOut, std::string* valueOut, std::string* commentOut) const
|
||||
{
|
||||
// allow many types of commenting
|
||||
@ -153,7 +137,6 @@ void IniFile::ParseLine(const std::string& line, std::string* keyOut, std::strin
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::string* IniFile::GetLine(Section* section, const char* key, std::string* valueOut, std::string* commentOut)
|
||||
{
|
||||
for (std::vector<std::string>::iterator iter = section->lines.begin(); iter != section->lines.end(); ++iter)
|
||||
@ -283,10 +266,6 @@ void IniFile::SortSections()
|
||||
std::sort(sections.begin(), sections.end());
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
// Load and save file
|
||||
// ------------
|
||||
bool IniFile::Load(const char* filename)
|
||||
{
|
||||
// Maximum number of letters in a line
|
||||
@ -382,12 +361,7 @@ bool IniFile::Save(const char* filename)
|
||||
out.close();
|
||||
return true;
|
||||
}
|
||||
//////////////////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
// Get and set elements
|
||||
// ------------
|
||||
void IniFile::Set(const char* sectionName, const char* key, const char* newValue)
|
||||
{
|
||||
Section* section = GetOrCreateSection(sectionName);
|
||||
@ -544,10 +518,9 @@ bool IniFile::Get(const char* sectionName, const char* key, bool* value, bool de
|
||||
*value = defaultValue;
|
||||
return false;
|
||||
}
|
||||
////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
// TODO: Keep this code below?
|
||||
/*
|
||||
int main()
|
||||
{
|
||||
@ -567,4 +540,3 @@ bool IniFile::Get(const char* sectionName, const char* key, bool* value, bool de
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _INIFILE_H
|
||||
#define _INIFILE_H
|
||||
#ifndef _INIFILE_H_
|
||||
#define _INIFILE_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -88,4 +88,4 @@ private:
|
||||
void CreateSection(const char* section);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // _INIFILE_H_
|
||||
|
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _LOG_H
|
||||
#define _LOG_H
|
||||
#ifndef _LOG_H_
|
||||
#define _LOG_H_
|
||||
|
||||
#define NOTICE_LEVEL 1 // VERY important information that is NOT errors. Like startup and OSReports.
|
||||
#define ERROR_LEVEL 2 // Critical errors
|
||||
@ -165,4 +165,4 @@ enum LOG_LEVELS {
|
||||
}
|
||||
#endif // WIN32
|
||||
|
||||
#endif // LOG_H
|
||||
#endif // _LOG_H_
|
||||
|
@ -1,3 +1,20 @@
|
||||
// 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/
|
||||
|
||||
#include "LogManager.h"
|
||||
#include "Timer.h"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _LOGMANAGER_H
|
||||
#define _LOGMANAGER_H
|
||||
#ifndef _LOGMANAGER_H_
|
||||
#define _LOGMANAGER_H_
|
||||
|
||||
#include "Log.h"
|
||||
#include "Thread.h"
|
||||
@ -187,4 +187,4 @@ public:
|
||||
~LogManager();
|
||||
};
|
||||
|
||||
#endif // LOGMANAGER_H
|
||||
#endif // _LOGMANAGER_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -230,4 +230,4 @@ IMappedFile* IMappedFile::CreateMappedFileDEPRECATED(void)
|
||||
{
|
||||
return(new CMappedFile);
|
||||
}
|
||||
} // end of namespace Common
|
||||
} // namespace Common
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -14,14 +14,16 @@
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
// ------------------------------------------------------
|
||||
// Handles giant memory mapped files
|
||||
// Through some trickery, allows lock on byte boundaries
|
||||
// instead of allocation granularity boundaries
|
||||
// for ease of use
|
||||
//
|
||||
// ------------------------------------------------------
|
||||
|
||||
#ifndef _MAPPED_FILE_H
|
||||
#define _MAPPED_FILE_H
|
||||
#ifndef _MAPPED_FILE_H_
|
||||
#define _MAPPED_FILE_H_
|
||||
|
||||
#include <map>
|
||||
|
||||
@ -44,4 +46,4 @@ public:
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
#endif // _MAPPED_FILE_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -40,5 +40,3 @@ void SaveSSEState()
|
||||
{
|
||||
saved_sse_state = _mm_getcsr();
|
||||
}
|
||||
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _MATH_UTIL_H
|
||||
#define _MATH_UTIL_H
|
||||
#ifndef _MATH_UTIL_H_
|
||||
#define _MATH_UTIL_H_
|
||||
|
||||
#include <xmmintrin.h>
|
||||
|
||||
@ -36,4 +36,4 @@ void LoadDefaultSSEState();
|
||||
|
||||
#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1))
|
||||
|
||||
#endif
|
||||
#endif // _MATH_UTIL_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _MEMARENA_H
|
||||
#define _MEMARENA_H
|
||||
#ifndef _MEMARENA_H_
|
||||
#define _MEMARENA_H_
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
@ -49,4 +49,4 @@ private:
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // _MEMARENA_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -41,9 +41,8 @@ void SetEnableAlert(bool enable) {
|
||||
correct windows is shown */
|
||||
bool MsgAlert(const char* caption, bool yes_no, int Style, const char* format, ...)
|
||||
{
|
||||
// ---------------------------------
|
||||
|
||||
// Read message and write it to the log
|
||||
// -----------
|
||||
char buffer[2048];
|
||||
bool ret = true;
|
||||
|
||||
@ -75,4 +74,3 @@ bool DefaultMsgHandler(const char* caption, const char* text, bool yes_no, int S
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef MSGHANDLER_H
|
||||
#define MSGHANDLER_H
|
||||
#ifndef _MSGHANDLER_H_
|
||||
#define _MSGHANDLER_H_
|
||||
// Message alerts
|
||||
enum MSG_TYPE
|
||||
{
|
||||
@ -43,4 +43,4 @@ void SetEnableAlert(bool enable);
|
||||
#define AskYesNo(format, ...) MsgAlert("Question", true, QUESTION, format, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#endif //MSGHANDLER
|
||||
#endif // _MSGHANDLER_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,11 +15,11 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
////////////////////////////////////////////////
|
||||
// --------------------------------------------------------------------------------------------
|
||||
// This is the common Plugin class that links to the functions that are
|
||||
// common to all plugins. This class is inherited by all plugin classes. But it's only created
|
||||
// directly in PluginManager.cpp when we check if a plugin is valid or not.
|
||||
///////////////////////////////////////////////
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
#include "Plugin.h"
|
||||
|
||||
@ -124,4 +124,4 @@ void CPlugin::Shutdown()
|
||||
m_Shutdown();
|
||||
}
|
||||
|
||||
} // end of namespace Common
|
||||
} // Namespace
|
||||
|
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _PLUGIN_H
|
||||
#define _PLUGIN_H
|
||||
#ifndef _PLUGIN_H_
|
||||
#define _PLUGIN_H_
|
||||
|
||||
#include "Common.h"
|
||||
#include "PluginSpecs.h"
|
||||
@ -67,6 +67,6 @@ private:
|
||||
TShutdown m_Shutdown;
|
||||
TDoState m_DoState;
|
||||
};
|
||||
} // end of namespace Common
|
||||
} // Namespace
|
||||
|
||||
#endif
|
||||
#endif // _PLUGIN_H_
|
||||
|
@ -1,3 +1,20 @@
|
||||
// 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/
|
||||
|
||||
#include "PluginDSP.h"
|
||||
|
||||
namespace Common {
|
||||
|
@ -1,5 +1,22 @@
|
||||
#ifndef _PLUGINDSP_H
|
||||
#define _PLUGINDSP_H
|
||||
// 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 _PLUGINDSP_H_
|
||||
#define _PLUGINDSP_H_
|
||||
|
||||
#include "pluginspecs_dsp.h"
|
||||
#include "Plugin.h"
|
||||
@ -38,4 +55,4 @@ private:
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
#endif // _PLUGINDSP_H_
|
||||
|
@ -1,3 +1,20 @@
|
||||
// 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/
|
||||
|
||||
#include "PluginPAD.h"
|
||||
|
||||
namespace Common
|
||||
@ -21,4 +38,4 @@ namespace Common
|
||||
}
|
||||
|
||||
PluginPAD::~PluginPAD() {}
|
||||
}
|
||||
} // Namespace
|
||||
|
@ -1,5 +1,22 @@
|
||||
#ifndef _PLUGINPAD_H
|
||||
#define _PLUGINPAD_H
|
||||
// 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 _PLUGINPAD_H_
|
||||
#define _PLUGINPAD_H_
|
||||
|
||||
#include "pluginspecs_pad.h"
|
||||
#include "Plugin.h"
|
||||
@ -29,4 +46,4 @@ private:
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
#endif // _PLUGINPAD_H_
|
||||
|
@ -1,3 +1,20 @@
|
||||
// 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/
|
||||
|
||||
#include "PluginVideo.h"
|
||||
|
||||
namespace Common
|
||||
|
@ -1,5 +1,22 @@
|
||||
#ifndef _PLUGINVIDEO_H
|
||||
#define _PLUGINVIDEO_H
|
||||
// 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 _PLUGINVIDEO_H_
|
||||
#define _PLUGINVIDEO_H_
|
||||
|
||||
#include "pluginspecs_video.h"
|
||||
#include "Plugin.h"
|
||||
@ -36,4 +53,4 @@ private:
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
#endif // _PLUGINVIDEO_H_
|
||||
|
@ -1,3 +1,20 @@
|
||||
// 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/
|
||||
|
||||
#include "PluginWiimote.h"
|
||||
|
||||
namespace Common {
|
||||
@ -21,7 +38,6 @@ PluginWiimote::PluginWiimote(const char *_Filename)
|
||||
validWiimote = true;
|
||||
}
|
||||
|
||||
PluginWiimote::~PluginWiimote() {
|
||||
}
|
||||
PluginWiimote::~PluginWiimote() { }
|
||||
|
||||
}
|
||||
} // Namespace
|
||||
|
@ -1,5 +1,22 @@
|
||||
#ifndef _PLUGINWIIMOTE_H
|
||||
#define _PLUGINWIIMOTE_H
|
||||
// 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 _PLUGINWIIMOTE_H_
|
||||
#define _PLUGINWIIMOTE_H_
|
||||
|
||||
#include "pluginspecs_wiimote.h"
|
||||
#include "Plugin.h"
|
||||
@ -29,4 +46,4 @@ private:
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
#endif // _PLUGINWIIMOTE_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,23 +15,19 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef __SETUP_h__
|
||||
#define __SETUP_h__
|
||||
#ifndef _SETUP_H_
|
||||
#define _SETUP_H_
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// File description
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// File description:
|
||||
// Compilation settings. I avoid placing this in Common.h or some place where lots of files needs
|
||||
// to be rebuilt if any of these settings are changed. I'd rather have it in as few files as possible.
|
||||
// This file can be kept on the ignore list in your SVN program. It allows local optional settings
|
||||
// depending on what works on your computer.
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
Compilation settings. I avoid placing this in Common.h or some place where lots of files needs
|
||||
to be rebuilt if any of these settings are changed. I'd rather have it in as few files as possible.
|
||||
This file can be kept on the ignore list in your SVN program. It allows local optional settings
|
||||
depending on what works on your computer.
|
||||
|
||||
////////////////////////*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Settings
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// Settings:
|
||||
|
||||
// This may remove sound artifacts in Wario Land Shake It and perhaps other games
|
||||
//#define SETUP_AVOID_SOUND_ARTIFACTS
|
||||
@ -64,7 +60,7 @@
|
||||
// Build with music modification
|
||||
//#define MUSICMOD
|
||||
|
||||
///////////////////////////
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
#endif // __SETUP_h__
|
||||
#endif // _SETUP_H_
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -66,10 +66,7 @@ bool AsciiToHex(const char* _szValue, u32& result)
|
||||
return (true);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Convert AB to it's ascii table entry numbers 0x4142
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
u32 Ascii2Hex(std::string _Text)
|
||||
{
|
||||
// Reset the return value zero
|
||||
@ -100,8 +97,6 @@ std::string Hex2Ascii(u32 _Text)
|
||||
std::string StrResult = Result;
|
||||
return StrResult;
|
||||
}
|
||||
///////////////////////////
|
||||
|
||||
|
||||
bool CharArrayFromFormatV(char* out, int outsize, const char* format, va_list args)
|
||||
{
|
||||
@ -119,7 +114,6 @@ bool CharArrayFromFormatV(char* out, int outsize, const char* format, va_list ar
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Expensive!
|
||||
void ToStringFromFormat(std::string* out, const char* format, ...)
|
||||
{
|
||||
@ -183,9 +177,7 @@ std::string StringFromFormat(const char* format, ...)
|
||||
}
|
||||
|
||||
|
||||
// ===================================================
|
||||
/* For Debugging. Read out an u8 array. */
|
||||
// ----------------
|
||||
// For Debugging. Read out an u8 array.
|
||||
std::string ArrayToString(const u8 *data, u32 size, u32 offset, int line_len, bool Spaces)
|
||||
{
|
||||
std::string Tmp, Spc;
|
||||
@ -197,8 +189,6 @@ std::string ArrayToString(const u8 *data, u32 size, u32 offset, int line_len, bo
|
||||
}
|
||||
return Tmp;
|
||||
}
|
||||
// ================
|
||||
|
||||
|
||||
// Turns " hej " into "hej". Also handles tabs.
|
||||
std::string StripSpaces(const std::string &str)
|
||||
@ -459,5 +449,3 @@ std::string ThS(int Integer, bool Unsigned)
|
||||
}
|
||||
return sbuf;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _STRINGUTIL_H
|
||||
#define _STRINGUTIL_H
|
||||
#ifndef _STRINGUTIL_H_
|
||||
#define _STRINGUTIL_H_
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
@ -75,4 +75,4 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _
|
||||
void BuildCompleteFilename(std::string& _CompleteFilename, const std::string& _Path, const std::string& _Filename);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // _STRINGUTIL_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -18,14 +18,11 @@
|
||||
#include "Setup.h"
|
||||
#include "Thread.h"
|
||||
#include "Log.h"
|
||||
// -----------------------------------------
|
||||
#ifdef SETUP_TIMER_WAITING
|
||||
// -----------------
|
||||
#include <windows.h>
|
||||
#include "ConsoleWindow.h"
|
||||
EventCallBack FunctionPointer[10];
|
||||
#endif
|
||||
// ------------------------
|
||||
|
||||
namespace Common
|
||||
{
|
||||
@ -68,7 +65,6 @@ void CriticalSection::Leave()
|
||||
LeaveCriticalSection(§ion);
|
||||
}
|
||||
|
||||
|
||||
Thread::Thread(ThreadFunc function, void* arg)
|
||||
: m_hThread(NULL), m_threadId(0)
|
||||
{
|
||||
@ -106,10 +102,7 @@ void Thread::SetCurrentThreadAffinity(int mask)
|
||||
SetThreadAffinityMask(GetCurrentThread(), mask);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Regular same thread loop based waiting
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
Event::Event()
|
||||
{
|
||||
m_hEvent = 0;
|
||||
@ -186,14 +179,9 @@ void Event::MsgWait()
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
/* Separate thread timer based waiting, instead of same thread loop waiting. The downside with this
|
||||
is that it's less convenient to use because we can't stall any threads with a loop. The positive
|
||||
is that we don't cause these incredibly annoying WaitForEternity() hangings. */
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#ifdef SETUP_TIMER_WAITING
|
||||
/* I could not figure out how to place this in the class to, CreateTimerQueueTimer() would complain
|
||||
about some kind of type casting, anyone have any ideas about how to do it? */
|
||||
@ -280,14 +268,8 @@ void Event::SetTimer()
|
||||
if (StartWait) DoneWaiting = true;
|
||||
}
|
||||
#endif
|
||||
////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Supporting functions
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
void SleepCurrentThread(int ms)
|
||||
{
|
||||
Sleep(ms);
|
||||
@ -350,8 +332,6 @@ LONG SyncInterlockedExchange(LONG *Dest, LONG Val)
|
||||
{
|
||||
return InterlockedExchange(Dest, Val);
|
||||
}
|
||||
////////////////////////////////////////
|
||||
|
||||
|
||||
#else // !WIN32, so must be POSIX threads
|
||||
|
||||
@ -572,4 +552,4 @@ LONG SyncInterlockedExchange(LONG *Dest, LONG Val)
|
||||
|
||||
#endif
|
||||
|
||||
} // end of namespace Common
|
||||
} // namespace Common
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,12 +15,9 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _THREAD_H
|
||||
#define _THREAD_H
|
||||
#ifndef _THREAD_H_
|
||||
#define _THREAD_H_
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Includes
|
||||
// ------------
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#define THREAD_RETURN DWORD WINAPI
|
||||
@ -39,9 +36,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Definitions
|
||||
// ------------
|
||||
// This may not be defined outside _WIN32
|
||||
#ifndef _WIN32
|
||||
#ifndef INFINITE
|
||||
@ -124,9 +118,7 @@ public:
|
||||
void MsgWait() {Wait();}
|
||||
#endif
|
||||
|
||||
// -----------------------------------------
|
||||
#ifdef SETUP_TIMER_WAITING
|
||||
// -----------------
|
||||
bool TimerWait(EventCallBack WaitCB, int Id = 0, bool OptCondition = true);
|
||||
bool DoneWait();
|
||||
void SetTimer();
|
||||
@ -136,7 +128,6 @@ public:
|
||||
HANDLE hTimer;
|
||||
HANDLE hTimerQueue;
|
||||
#endif
|
||||
// ---------------------------
|
||||
|
||||
private:
|
||||
#ifdef _WIN32
|
||||
@ -163,6 +154,6 @@ LONG SyncInterlockedExchangeAdd(LONG *Dest, LONG Val);
|
||||
LONG SyncInterlockedExchange(LONG *Dest, LONG Val);
|
||||
LONG SyncInterlockedIncrement(LONG *Dest);
|
||||
|
||||
} // end of namespace Common
|
||||
} // namespace Common
|
||||
|
||||
#endif
|
||||
#endif // _STRINGUTIL_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _THUNK_H
|
||||
#define _THUNK_H
|
||||
#ifndef _THUNK_H_
|
||||
#define _THUNK_H_
|
||||
|
||||
#include <map>
|
||||
|
||||
@ -52,4 +52,4 @@ public:
|
||||
|
||||
extern ThunkManager thunks;
|
||||
|
||||
#endif
|
||||
#endif // _THUNK_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -39,9 +39,9 @@ u32 timeGetTime()
|
||||
namespace Common
|
||||
{
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// --------------------------------------------
|
||||
// Initiate, Start, Stop, and Update the time
|
||||
// ---------------
|
||||
// --------------------------------------------
|
||||
|
||||
// Set initial values for the class
|
||||
Timer::Timer()
|
||||
@ -75,13 +75,12 @@ void Timer::Update()
|
||||
m_LastTime = timeGetTime();
|
||||
//TODO(ector) - QPF
|
||||
}
|
||||
/////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// -------------------------------------
|
||||
// Get time difference and elapsed time
|
||||
// ---------------
|
||||
// -------------------------------------
|
||||
|
||||
// Get the number of milliseconds since the last Update()
|
||||
s64 Timer::GetTimeDifference()
|
||||
@ -138,13 +137,7 @@ std::string Timer::GetTimeElapsedFormatted() const
|
||||
return TmpStr;
|
||||
}
|
||||
|
||||
/////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Get current time
|
||||
// ---------------
|
||||
void Timer::IncreaseResolution()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
@ -212,4 +205,4 @@ std::string Timer::GetTimeFormatted()
|
||||
return std::string(formattedTime);
|
||||
}
|
||||
|
||||
} // end of namespace Common
|
||||
} // Namespace Common
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _TIMER_H
|
||||
#define _TIMER_H
|
||||
#ifndef _TIMER_H_
|
||||
#define _TIMER_H_
|
||||
|
||||
#include "Common.h"
|
||||
#include <string>
|
||||
@ -53,10 +53,10 @@ public:
|
||||
bool m_Running;
|
||||
};
|
||||
|
||||
} // end of namespace Common
|
||||
} // Namespace Common
|
||||
|
||||
#ifdef __GNUC__
|
||||
u32 timeGetTime();
|
||||
#endif
|
||||
#endif // GNUC
|
||||
|
||||
#endif
|
||||
#endif // _TIMER_H_
|
||||
|
@ -1,18 +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 "stdafx.h"
|
@ -1,35 +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/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x501
|
||||
#endif
|
||||
#ifndef _WIN32_IE
|
||||
#define _WIN32_IE 0x0500 // Default value is 0x0400
|
||||
#endif
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
#define _CRT_NONSTDC_NO_DEPRECATE 1
|
||||
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
#include <vector>
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -14,6 +14,7 @@
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "x64Analyzer.h"
|
||||
|
||||
bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int accessType)
|
||||
@ -227,6 +228,3 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc
|
||||
info.instructionSize = (int)(codePtr - startCodePtr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -14,8 +14,9 @@
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
#ifndef _X64ANALYZER_H
|
||||
#define _X64ANALYZER_H
|
||||
|
||||
#ifndef _X64ANALYZER_H_
|
||||
#define _X64ANALYZER_H_
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
@ -53,4 +54,4 @@ enum AccessType{
|
||||
|
||||
bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int accessType);
|
||||
|
||||
#endif
|
||||
#endif // _X64ANALYZER_H_
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// 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
|
||||
@ -17,8 +17,8 @@
|
||||
|
||||
// WARNING - THIS LIBRARY IS NOT THREAD SAFE!!!
|
||||
|
||||
#ifndef _DOLPHIN_INTEL_CODEGEN
|
||||
#define _DOLPHIN_INTEL_CODEGEN
|
||||
#ifndef _DOLPHIN_INTEL_CODEGEN_
|
||||
#define _DOLPHIN_INTEL_CODEGEN_
|
||||
|
||||
#include "Common.h"
|
||||
#include "MemoryUtil.h"
|
||||
@ -721,4 +721,4 @@ public:
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
#endif // _DOLPHIN_INTEL_CODEGEN_
|
||||
|
Reference in New Issue
Block a user