__WIN32__ / WIN32 -> __WINDOWS__

Originally committed to SVN as r381.
This commit is contained in:
David Lamparter 2006-05-10 00:33:44 +00:00
parent 3a260cf0ce
commit 05aa32cbe4
11 changed files with 18 additions and 18 deletions

View File

@ -64,7 +64,7 @@ void AegisubLocale::Init(int language) {
if (locale) delete locale; if (locale) delete locale;
curCode = language; curCode = language;
locale = new wxLocale(language); locale = new wxLocale(language);
#ifdef WIN32 #ifdef __WINDOWS__
locale->AddCatalogLookupPathPrefix(AegisubApp::folderName + _T("locale/")); locale->AddCatalogLookupPathPrefix(AegisubApp::folderName + _T("locale/"));
#endif #endif
locale->AddCatalog(_T("aegisub")); locale->AddCatalog(_T("aegisub"));

View File

@ -75,7 +75,7 @@ PortAudioPlayer::~PortAudioPlayer() {
if (!--pa_refcount) Pa_Terminate(); if (!--pa_refcount) Pa_Terminate();
} }
#ifdef __WIN32__ #ifdef __WINDOWS__
typedef unsigned __int64 uint64_t; typedef unsigned __int64 uint64_t;
#endif #endif

View File

@ -48,7 +48,7 @@
#include "string_codec.h" #include "string_codec.h"
#include "vfr.h" #include "vfr.h"
#ifdef WIN32 #ifdef __WINDOWS__
#include <windows.h> #include <windows.h>
#include <wchar.h> #include <wchar.h>
#else #else
@ -297,7 +297,7 @@ namespace AutomationHelper {
wxLogDebug(_T("text_extents for: %s:%f:%d%d%d%d:%f:%f:%d:%d"), fontname.c_str(), fontsize, bold, italic, underline, strikeout, scale_x, scale_y, spacing, charset); wxLogDebug(_T("text_extents for: %s:%f:%d%d%d%d:%f:%f:%d:%d"), fontname.c_str(), fontsize, bold, italic, underline, strikeout, scale_x, scale_y, spacing, charset);
#ifdef WIN32 #ifdef __WINDOWS__
HDC thedc = CreateCompatibleDC(0); HDC thedc = CreateCompatibleDC(0);
if (!thedc) return 0; if (!thedc) return 0;
SetMapMode(thedc, MM_TEXT); SetMapMode(thedc, MM_TEXT);
@ -353,7 +353,7 @@ namespace AutomationHelper {
DeleteObject(thedc); DeleteObject(thedc);
DeleteObject(thefont); DeleteObject(thefont);
#else // not WIN32 #else // not __WINDOWS__
wxMemoryDC thedc; wxMemoryDC thedc;
// fix fontsize to be 72 DPI // fix fontsize to be 72 DPI

View File

@ -355,7 +355,7 @@ void DialogAutomationManager::EditScript(AutomationScript *script)
wxString editor; wxString editor;
if (!Options.IsDefined(_T("automation script editor")) || wxGetKeyState(WXK_SHIFT)) { if (!Options.IsDefined(_T("automation script editor")) || wxGetKeyState(WXK_SHIFT)) {
wxMessageBox(_T("You have not selected a script editor yet. Please select your script editor in the next window. It's recommended to use an editor with syntax highlighting for Lua scripts."), _T("Aegisub"), wxOK|wxICON_INFORMATION); wxMessageBox(_T("You have not selected a script editor yet. Please select your script editor in the next window. It's recommended to use an editor with syntax highlighting for Lua scripts."), _T("Aegisub"), wxOK|wxICON_INFORMATION);
#ifdef __WIN32__ #ifdef __WINDOWS__
editor = wxFileSelector(_T("Select script editor"), _T(""), _T("C:\\Windows\\Notepad.exe"), _T("exe"), _T("Execatuables (*.exe)|*.exe|All files (*.*)|*.*"), wxOPEN|wxFILE_MUST_EXIST); editor = wxFileSelector(_T("Select script editor"), _T(""), _T("C:\\Windows\\Notepad.exe"), _T("exe"), _T("Execatuables (*.exe)|*.exe|All files (*.*)|*.*"), wxOPEN|wxFILE_MUST_EXIST);
#else #else
char *env_editor = getenv("EDITOR"); char *env_editor = getenv("EDITOR");

View File

@ -38,7 +38,7 @@
// Includes // Includes
#include <wx/config.h> #include <wx/config.h>
#include <wx/filename.h> #include <wx/filename.h>
#ifdef __WIN32__ #ifdef __WINDOWS__
#include <shlobj.h> #include <shlobj.h>
#endif #endif
#include "ass_override.h" #include "ass_override.h"
@ -220,7 +220,7 @@ wxArrayString FontsCollectorThread::GetFontFiles (wxString face) {
/////////////////////// ///////////////////////
// Collect font files // Collect font files
void FontsCollectorThread::CollectFontData () { void FontsCollectorThread::CollectFontData () {
#ifdef __WIN32__ #ifdef __WINDOWS__
// Prepare key // Prepare key
wxRegKey *reg = new wxRegKey(_T("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts")); wxRegKey *reg = new wxRegKey(_T("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"));
// Try win9x // Try win9x
@ -325,7 +325,7 @@ void FontsCollectorThread::Collect() {
} }
} }
#ifdef __WIN32__ #ifdef __WINDOWS__
// Collect font data // Collect font data
wxMutexGuiEnter(); wxMutexGuiEnter();
LogBox->SetDefaultStyle(wxTextAttr(wxColour(0,0,180))); LogBox->SetDefaultStyle(wxTextAttr(wxColour(0,0,180)));

View File

@ -87,7 +87,7 @@ bool AegisubApp::OnInit() {
Hotkeys.SetFile(folderName + _T("/hotkeys.dat")); Hotkeys.SetFile(folderName + _T("/hotkeys.dat"));
Hotkeys.Load(); Hotkeys.Load();
#ifdef WIN32 #ifdef __WINDOWS__
// Set locale // Set locale
int lang = Options.AsInt(_T("Locale Code")); int lang = Options.AsInt(_T("Locale Code"));
if (lang == -1) { if (lang == -1) {
@ -228,7 +228,7 @@ int AegisubApp::OnRun() {
///////////////////////////////// /////////////////////////////////
// Registry program to filetypes // Registry program to filetypes
void AegisubApp::RegistryAssociate () { void AegisubApp::RegistryAssociate () {
#ifdef __WIN32__ #ifdef __WINDOWS__
// Command to open with this // Command to open with this
wxString command; wxString command;
command << _T("\"") << fullPath << _T("\" \"%1\""); command << _T("\"") << fullPath << _T("\" \"%1\"");
@ -304,7 +304,7 @@ void AegisubApp::GetFullPath(wxString arg) {
/////////////////////////////////// ///////////////////////////////////
// Gets folder name from full path // Gets folder name from full path
void AegisubApp::GetFolderName () { void AegisubApp::GetFolderName () {
#ifdef __WIN32__ #ifdef __WINDOWS__
folderName = _T(""); folderName = _T("");
wxFileName path(fullPath); wxFileName path(fullPath);
#else #else

View File

@ -41,7 +41,7 @@
#ifdef HAVE_ASA_ASA_H #ifdef HAVE_ASA_ASA_H
# include <asa/asa.h> # include <asa/asa.h>
#else #else
# ifdef WIN32 # ifdef __WINDOWS__
# include <asa.h> # include <asa.h>
# endif # endif
#endif #endif

View File

@ -66,7 +66,7 @@ int CountMatches(wxString parent,wxString child) {
/////////////// ///////////////
// Copy a file // Copy a file
#ifdef __WIN32__ #ifdef __WINDOWS__
bool Copy(wxString src,wxString dst) { bool Copy(wxString src,wxString dst) {
BOOL result = CopyFile(src.wc_str(),dst.wc_str(),false); BOOL result = CopyFile(src.wc_str(),dst.wc_str(),false);
return (result != 0); return (result != 0);
@ -77,7 +77,7 @@ bool Copy(wxString src,wxString dst) {
// Backup a file // Backup a file
bool Backup(wxString src,wxString dst) { bool Backup(wxString src,wxString dst) {
// Windows // Windows
#if defined(__WIN32__) #if defined(__WINDOWS__)
return Copy(src,dst); return Copy(src,dst);
// Linux // Linux

View File

@ -37,7 +37,7 @@
#include <wx/datetime.h> #include <wx/datetime.h>
#include "version.h" #include "version.h"
#ifdef WIN32 #ifdef __WINDOWS__
// This include is generated by build/make-svn-rev-header.py // This include is generated by build/make-svn-rev-header.py
// That script should be run before every build is initiated // That script should be run before every build is initiated
#include "build/svn-revision.h" #include "build/svn-revision.h"

View File

@ -190,7 +190,7 @@ void VideoDisplay::SetVideo(const wxString &filename) {
// Close mkv // Close mkv
MatroskaWrapper::wrapper.Close(); MatroskaWrapper::wrapper.Close();
} }
#ifdef __WIN32__ #ifdef __WINDOWS__
else if (ext == _T(".avi")) KeyFrames = VFWWrapper::GetKeyFrames(filename); else if (ext == _T(".avi")) KeyFrames = VFWWrapper::GetKeyFrames(filename);
#endif #endif

View File

@ -41,7 +41,7 @@
/////////// ///////////
// Headers // Headers
#include <wx/wxprec.h> #include <wx/wxprec.h>
#ifdef __WIN32__ #ifdef __WINDOWS__
#include <windows.h> #include <windows.h>
#endif #endif
#include <time.h> #include <time.h>