diff --git a/Makefile.bundle.in b/Makefile.bundle.in index 63edb62d97..969b2ebcf0 100644 --- a/Makefile.bundle.in +++ b/Makefile.bundle.in @@ -172,6 +172,7 @@ install: bundle $(Q)install -d "$(INSTALL_BINARY_DIR)" $(Q)install -d "$(INSTALL_ICON_DIR)" $(Q)install -d "$(INSTALL_DATA_DIR)/ai" + $(Q)install -d "$(INSTALL_DATA_DIR)/game" $(Q)install -d "$(INSTALL_DATA_DIR)/baseset" $(Q)install -d "$(INSTALL_DATA_DIR)/lang" $(Q)install -d "$(INSTALL_DATA_DIR)/scripts" @@ -182,6 +183,7 @@ else endif $(Q)install -m 644 "$(BUNDLE_DIR)/lang/"* "$(INSTALL_DATA_DIR)/lang" $(Q)install -m 644 "$(BUNDLE_DIR)/ai/"* "$(INSTALL_DATA_DIR)/ai" + $(Q)install -m 644 "$(BUNDLE_DIR)/game/"* "$(INSTALL_DATA_DIR)/game" $(Q)install -m 644 "$(BUNDLE_DIR)/baseset/"* "$(INSTALL_DATA_DIR)/baseset" $(Q)install -m 644 "$(BUNDLE_DIR)/scripts/"* "$(INSTALL_DATA_DIR)/scripts" ifndef DO_NOT_INSTALL_DOCS diff --git a/src/ini.cpp b/src/ini.cpp index ccce192393..905ebfacf8 100644 --- a/src/ini.cpp +++ b/src/ini.cpp @@ -16,7 +16,6 @@ #include "fileio_func.h" #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 500) -# define WITH_FDATASYNC # include #endif @@ -80,7 +79,7 @@ bool IniFile::SaveToDisk(const char *filename) * APIs to do so. We only need to flush the data as the metadata itself * (modification date etc.) is not important to us; only the real data is. */ -#ifdef WITH_FDATASYNC +#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 int ret = fdatasync(fileno(f)); fclose(f); if (ret != 0) return false; diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index f1af4804e4..0652d1bd81 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1883,13 +1883,13 @@ struct GameSettingsWindow : Window { if (this->warn_missing != WHR_NONE) { const int left = panel->pos_x; const int right = left + panel->current_x - 1; - const int top = panel->pos_y; + const int top = panel->pos_y + WD_FRAMETEXT_TOP + (SETTING_HEIGHT - FONT_HEIGHT_NORMAL) * this->warn_lines / 2; SetDParam(0, _game_settings_restrict_dropdown[this->filter.min_cat]); if (this->warn_lines == 1) { /* If the warning fits at one line, center it. */ - DrawString(left + WD_FRAMETEXT_LEFT, right - WD_FRAMETEXT_RIGHT, top + WD_FRAMETEXT_TOP, warn_str, TC_FROMSTRING, SA_HOR_CENTER); + DrawString(left + WD_FRAMETEXT_LEFT, right - WD_FRAMETEXT_RIGHT, top, warn_str, TC_FROMSTRING, SA_HOR_CENTER); } else { - DrawStringMultiLine(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top + WD_FRAMERECT_TOP, INT32_MAX, warn_str); + DrawStringMultiLine(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, INT32_MAX, warn_str, TC_FROMSTRING, SA_HOR_CENTER); } } } @@ -1943,7 +1943,7 @@ struct GameSettingsWindow : Window { { switch (widget) { case WID_GS_OPTIONSPANEL: { - int top_pos = r.top + SETTINGTREE_TOP_OFFSET + 1 + this->warn_lines * FONT_HEIGHT_NORMAL; + int top_pos = r.top + SETTINGTREE_TOP_OFFSET + 1 + this->warn_lines * SETTING_HEIGHT; uint last_row = this->vscroll->GetPosition() + this->vscroll->GetCapacity() - this->warn_lines; int next_row = GetSettingsTree().Draw(settings_ptr, r.left + SETTINGTREE_LEFT_OFFSET, r.right - SETTINGTREE_RIGHT_OFFSET, top_pos, this->vscroll->GetPosition(), last_row, this->last_clicked); diff --git a/src/sound/win32_s.cpp b/src/sound/win32_s.cpp index 0cd632714c..45f88172a9 100644 --- a/src/sound/win32_s.cpp +++ b/src/sound/win32_s.cpp @@ -81,7 +81,7 @@ const char *SoundDriver_Win32::Start(const char * const *parm) PrepareHeader(&_wave_hdr[1]); if (NULL == (_thread = CreateThread(NULL, 8192, SoundThread, 0, 0, &_threadId))) throw "Failed to create thread"; - } catch (char *error) { + } catch (const char *error) { this->Stop(); return error; }