From ed67ee0d597ff38a9613b6b72de33363182e19e5 Mon Sep 17 00:00:00 2001 From: David Capello Date: Sun, 21 Sep 2014 12:18:01 -0300 Subject: [PATCH] Minor changes: remove more unnecessary references to allegro.h --- src/app/log.cpp | 8 +++----- src/app/modules/gui.cpp | 11 ++--------- src/app/settings/ui_settings_impl.cpp | 1 - src/app/ui/editor/editor.cpp | 1 - src/app/ui/editor/select_box_state.cpp | 2 -- src/app/ui/file_list.cpp | 13 +++++++------ 6 files changed, 12 insertions(+), 24 deletions(-) diff --git a/src/app/log.cpp b/src/app/log.cpp index c11324d51..cb1114075 100644 --- a/src/app/log.cpp +++ b/src/app/log.cpp @@ -26,11 +26,9 @@ #include "app/resource_finder.h" #include "ui/base.h" -#include -#include -#include -#include -#include +#include +#include +#include #include namespace app { diff --git a/src/app/modules/gui.cpp b/src/app/modules/gui.cpp index b372e8ae5..2f619ebd1 100644 --- a/src/app/modules/gui.cpp +++ b/src/app/modules/gui.cpp @@ -58,14 +58,11 @@ #include "ui/ui.h" #include -#include -#include #include #include -#ifdef ALLEGRO_WINDOWS -#include - +#ifdef WIN32 + #include #endif #define SPRITEDITOR_ACTION_COPYSELECTION "CopySelection" @@ -243,9 +240,6 @@ void exit_module_gui() CurrentTheme::set(NULL); delete ase_theme; - remove_keyboard(); - remove_mouse(); - main_clipboard->dispose(); main_display->dispose(); } @@ -266,7 +260,6 @@ static void save_gui_config() set_config_bool("GfxMode", "Maximized", display->isMaximized()); set_config_int("GfxMode", "Width", display->originalWidth()); set_config_int("GfxMode", "Height", display->originalHeight()); - set_config_int("GfxMode", "Depth", bitmap_color_depth(screen)); } set_config_int("GfxMode", "ScreenScale", screen_scaling); } diff --git a/src/app/settings/ui_settings_impl.cpp b/src/app/settings/ui_settings_impl.cpp index e8a480c95..e74a18b59 100644 --- a/src/app/settings/ui_settings_impl.cpp +++ b/src/app/settings/ui_settings_impl.cpp @@ -42,7 +42,6 @@ #include "ui/system.h" #include -#include #include #define DEFAULT_ONIONSKIN_TYPE Onionskin_Merge diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp index 0e61288a2..c077e8e75 100644 --- a/src/app/ui/editor/editor.cpp +++ b/src/app/ui/editor/editor.cpp @@ -61,7 +61,6 @@ #include "she/system.h" #include "ui/ui.h" -#include #include namespace app { diff --git a/src/app/ui/editor/select_box_state.cpp b/src/app/ui/editor/select_box_state.cpp index 62504b804..5e514e265 100644 --- a/src/app/ui/editor/select_box_state.cpp +++ b/src/app/ui/editor/select_box_state.cpp @@ -30,8 +30,6 @@ #include "ui/system.h" #include "ui/view.h" -#include - namespace app { using namespace ui; diff --git a/src/app/ui/file_list.cpp b/src/app/ui/file_list.cpp index 4f0882fad..235e2b4eb 100644 --- a/src/app/ui/file_list.cpp +++ b/src/app/ui/file_list.cpp @@ -30,7 +30,8 @@ #include "ui/ui.h" #include -#include +#include +#include #define ISEARCH_KEYPRESS_INTERVAL_MSECS 500 @@ -245,8 +246,8 @@ bool FileList::onProcessMessage(Message* msg) default: if (unicodeChar == ' ' || - (utolower(unicodeChar) >= 'a' && - utolower(unicodeChar) <= 'z') || + (std::tolower(unicodeChar) >= 'a' && + std::tolower(unicodeChar) <= 'z') || (unicodeChar >= '0' && unicodeChar <= '9')) { if (ui::clock() - m_isearchClock > ISEARCH_KEYPRESS_INTERVAL_MSECS) @@ -260,9 +261,9 @@ bool FileList::onProcessMessage(Message* msg) for (i=MAX(select, 0); igetDisplayName().c_str(), - m_isearch.c_str(), - chrs) == 0) { + if (strnicmp(fi->getDisplayName().c_str(), + m_isearch.c_str(), + chrs) == 0) { select = i; break; }