From 05aa32cbe4c59750e14da8dccaf8353e1b682e61 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 10 May 2006 00:33:44 +0000 Subject: [PATCH] __WIN32__ / WIN32 -> __WINDOWS__ Originally committed to SVN as r381. --- core/aegisublocale.cpp | 2 +- core/audio_player_portaudio.cpp | 2 +- core/automation.cpp | 6 +++--- core/automation_gui.cpp | 2 +- core/fonts_collector.cpp | 6 +++--- core/main.cpp | 6 +++--- core/subtitle_provider_asa.cpp | 2 +- core/utils.cpp | 4 ++-- core/version.cpp | 2 +- core/video_display.cpp | 2 +- core/video_display.h | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/core/aegisublocale.cpp b/core/aegisublocale.cpp index a274bd269..89303d919 100644 --- a/core/aegisublocale.cpp +++ b/core/aegisublocale.cpp @@ -64,7 +64,7 @@ void AegisubLocale::Init(int language) { if (locale) delete locale; curCode = language; locale = new wxLocale(language); -#ifdef WIN32 +#ifdef __WINDOWS__ locale->AddCatalogLookupPathPrefix(AegisubApp::folderName + _T("locale/")); #endif locale->AddCatalog(_T("aegisub")); diff --git a/core/audio_player_portaudio.cpp b/core/audio_player_portaudio.cpp index d095f7944..f5dccb498 100644 --- a/core/audio_player_portaudio.cpp +++ b/core/audio_player_portaudio.cpp @@ -75,7 +75,7 @@ PortAudioPlayer::~PortAudioPlayer() { if (!--pa_refcount) Pa_Terminate(); } -#ifdef __WIN32__ +#ifdef __WINDOWS__ typedef unsigned __int64 uint64_t; #endif diff --git a/core/automation.cpp b/core/automation.cpp index 78b79ff63..a11349471 100644 --- a/core/automation.cpp +++ b/core/automation.cpp @@ -48,7 +48,7 @@ #include "string_codec.h" #include "vfr.h" -#ifdef WIN32 +#ifdef __WINDOWS__ #include #include #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); -#ifdef WIN32 +#ifdef __WINDOWS__ HDC thedc = CreateCompatibleDC(0); if (!thedc) return 0; SetMapMode(thedc, MM_TEXT); @@ -353,7 +353,7 @@ namespace AutomationHelper { DeleteObject(thedc); DeleteObject(thefont); -#else // not WIN32 +#else // not __WINDOWS__ wxMemoryDC thedc; // fix fontsize to be 72 DPI diff --git a/core/automation_gui.cpp b/core/automation_gui.cpp index f5e10252e..d0230384c 100644 --- a/core/automation_gui.cpp +++ b/core/automation_gui.cpp @@ -355,7 +355,7 @@ void DialogAutomationManager::EditScript(AutomationScript *script) wxString editor; 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); -#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); #else char *env_editor = getenv("EDITOR"); diff --git a/core/fonts_collector.cpp b/core/fonts_collector.cpp index fdf85a8bc..1d02f2d85 100644 --- a/core/fonts_collector.cpp +++ b/core/fonts_collector.cpp @@ -38,7 +38,7 @@ // Includes #include #include -#ifdef __WIN32__ +#ifdef __WINDOWS__ #include #endif #include "ass_override.h" @@ -220,7 +220,7 @@ wxArrayString FontsCollectorThread::GetFontFiles (wxString face) { /////////////////////// // Collect font files void FontsCollectorThread::CollectFontData () { -#ifdef __WIN32__ +#ifdef __WINDOWS__ // Prepare key wxRegKey *reg = new wxRegKey(_T("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts")); // Try win9x @@ -325,7 +325,7 @@ void FontsCollectorThread::Collect() { } } -#ifdef __WIN32__ +#ifdef __WINDOWS__ // Collect font data wxMutexGuiEnter(); LogBox->SetDefaultStyle(wxTextAttr(wxColour(0,0,180))); diff --git a/core/main.cpp b/core/main.cpp index f43a5b4c0..cb9aa1ad3 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -87,7 +87,7 @@ bool AegisubApp::OnInit() { Hotkeys.SetFile(folderName + _T("/hotkeys.dat")); Hotkeys.Load(); -#ifdef WIN32 +#ifdef __WINDOWS__ // Set locale int lang = Options.AsInt(_T("Locale Code")); if (lang == -1) { @@ -228,7 +228,7 @@ int AegisubApp::OnRun() { ///////////////////////////////// // Registry program to filetypes void AegisubApp::RegistryAssociate () { -#ifdef __WIN32__ +#ifdef __WINDOWS__ // Command to open with this wxString command; command << _T("\"") << fullPath << _T("\" \"%1\""); @@ -304,7 +304,7 @@ void AegisubApp::GetFullPath(wxString arg) { /////////////////////////////////// // Gets folder name from full path void AegisubApp::GetFolderName () { -#ifdef __WIN32__ +#ifdef __WINDOWS__ folderName = _T(""); wxFileName path(fullPath); #else diff --git a/core/subtitle_provider_asa.cpp b/core/subtitle_provider_asa.cpp index d4347d551..214b10f8b 100644 --- a/core/subtitle_provider_asa.cpp +++ b/core/subtitle_provider_asa.cpp @@ -41,7 +41,7 @@ #ifdef HAVE_ASA_ASA_H # include #else -# ifdef WIN32 +# ifdef __WINDOWS__ # include # endif #endif diff --git a/core/utils.cpp b/core/utils.cpp index 311084331..9f436347f 100644 --- a/core/utils.cpp +++ b/core/utils.cpp @@ -66,7 +66,7 @@ int CountMatches(wxString parent,wxString child) { /////////////// // Copy a file -#ifdef __WIN32__ +#ifdef __WINDOWS__ bool Copy(wxString src,wxString dst) { BOOL result = CopyFile(src.wc_str(),dst.wc_str(),false); return (result != 0); @@ -77,7 +77,7 @@ bool Copy(wxString src,wxString dst) { // Backup a file bool Backup(wxString src,wxString dst) { // Windows - #if defined(__WIN32__) + #if defined(__WINDOWS__) return Copy(src,dst); // Linux diff --git a/core/version.cpp b/core/version.cpp index 87743978a..64541cb52 100644 --- a/core/version.cpp +++ b/core/version.cpp @@ -37,7 +37,7 @@ #include #include "version.h" -#ifdef WIN32 +#ifdef __WINDOWS__ // This include is generated by build/make-svn-rev-header.py // That script should be run before every build is initiated #include "build/svn-revision.h" diff --git a/core/video_display.cpp b/core/video_display.cpp index f01728228..6699697b8 100644 --- a/core/video_display.cpp +++ b/core/video_display.cpp @@ -190,7 +190,7 @@ void VideoDisplay::SetVideo(const wxString &filename) { // Close mkv MatroskaWrapper::wrapper.Close(); } -#ifdef __WIN32__ +#ifdef __WINDOWS__ else if (ext == _T(".avi")) KeyFrames = VFWWrapper::GetKeyFrames(filename); #endif diff --git a/core/video_display.h b/core/video_display.h index 1259b6e4b..b6688d0b9 100644 --- a/core/video_display.h +++ b/core/video_display.h @@ -41,7 +41,7 @@ /////////// // Headers #include -#ifdef __WIN32__ +#ifdef __WINDOWS__ #include #endif #include