You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(10) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(2) |
May
(10) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2008 |
Jan
(6) |
Feb
(4) |
Mar
(5) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(4) |
Aug
(6) |
Sep
(2) |
Oct
(9) |
Nov
(1) |
Dec
(4) |
2009 |
Jan
(9) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(6) |
Jun
(18) |
Jul
(33) |
Aug
(39) |
Sep
(33) |
Oct
(24) |
Nov
(23) |
Dec
(22) |
2010 |
Jan
(29) |
Feb
(32) |
Mar
(51) |
Apr
(17) |
May
(31) |
Jun
(21) |
Jul
(32) |
Aug
(28) |
Sep
(35) |
Oct
(27) |
Nov
(11) |
Dec
(13) |
2011 |
Jan
(14) |
Feb
(13) |
Mar
(27) |
Apr
(27) |
May
(28) |
Jun
(20) |
Jul
(43) |
Aug
(52) |
Sep
(66) |
Oct
(61) |
Nov
(11) |
Dec
(8) |
2012 |
Jan
(20) |
Feb
(30) |
Mar
(38) |
Apr
(21) |
May
(33) |
Jun
(21) |
Jul
(25) |
Aug
(9) |
Sep
(24) |
Oct
(42) |
Nov
(27) |
Dec
(41) |
2013 |
Jan
(20) |
Feb
(35) |
Mar
(156) |
Apr
(298) |
May
(258) |
Jun
(201) |
Jul
(105) |
Aug
(60) |
Sep
(193) |
Oct
(245) |
Nov
(280) |
Dec
(194) |
2014 |
Jan
(63) |
Feb
(202) |
Mar
(200) |
Apr
(23) |
May
(53) |
Jun
(105) |
Jul
(18) |
Aug
(26) |
Sep
(110) |
Oct
(187) |
Nov
(97) |
Dec
(74) |
2015 |
Jan
(45) |
Feb
(55) |
Mar
(116) |
Apr
(116) |
May
(193) |
Jun
(164) |
Jul
(50) |
Aug
(111) |
Sep
(98) |
Oct
(71) |
Nov
(103) |
Dec
(63) |
2016 |
Jan
(33) |
Feb
(101) |
Mar
(182) |
Apr
(139) |
May
(140) |
Jun
(103) |
Jul
(165) |
Aug
(286) |
Sep
(208) |
Oct
(127) |
Nov
(97) |
Dec
(54) |
2017 |
Jan
(64) |
Feb
(335) |
Mar
(202) |
Apr
(212) |
May
(139) |
Jun
(127) |
Jul
(294) |
Aug
(154) |
Sep
(170) |
Oct
(152) |
Nov
(156) |
Dec
(62) |
2018 |
Jan
(168) |
Feb
(237) |
Mar
(196) |
Apr
(174) |
May
(174) |
Jun
(161) |
Jul
(127) |
Aug
(88) |
Sep
(149) |
Oct
(66) |
Nov
(52) |
Dec
(135) |
2019 |
Jan
(146) |
Feb
(126) |
Mar
(104) |
Apr
(58) |
May
(60) |
Jun
(28) |
Jul
(197) |
Aug
(129) |
Sep
(141) |
Oct
(148) |
Nov
(63) |
Dec
(100) |
2020 |
Jan
(74) |
Feb
(37) |
Mar
(59) |
Apr
(154) |
May
(194) |
Jun
(133) |
Jul
(313) |
Aug
(197) |
Sep
(49) |
Oct
(162) |
Nov
(143) |
Dec
(57) |
2021 |
Jan
(120) |
Feb
(107) |
Mar
(314) |
Apr
(157) |
May
(524) |
Jun
(169) |
Jul
(72) |
Aug
(133) |
Sep
(135) |
Oct
(146) |
Nov
(198) |
Dec
(325) |
2022 |
Jan
(409) |
Feb
(249) |
Mar
(138) |
Apr
(95) |
May
(102) |
Jun
(221) |
Jul
(66) |
Aug
(120) |
Sep
(192) |
Oct
(131) |
Nov
(53) |
Dec
(171) |
2023 |
Jan
(357) |
Feb
(82) |
Mar
(168) |
Apr
(218) |
May
(196) |
Jun
(86) |
Jul
(115) |
Aug
(49) |
Sep
(190) |
Oct
(102) |
Nov
(45) |
Dec
(76) |
2024 |
Jan
(86) |
Feb
(50) |
Mar
(324) |
Apr
(209) |
May
(197) |
Jun
(232) |
Jul
(194) |
Aug
(247) |
Sep
(219) |
Oct
(266) |
Nov
(328) |
Dec
(304) |
2025 |
Jan
(191) |
Feb
(115) |
Mar
(137) |
Apr
(32) |
May
(126) |
Jun
(403) |
Jul
(86) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@op...> - 2025-01-03 20:59:00
|
Author: manx Date: Fri Jan 3 21:58:48 2025 New Revision: 22760 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22760 Log: Merged revision(s) 22743 from trunk/OpenMPT: [Ref] mpt/base/detect_os.hpp: Add MPT_OS_CYGWIN detection. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/src/mpt/base/detect_os.hpp Modified: branches/OpenMPT-1.30/src/mpt/base/detect_os.hpp ============================================================================== --- branches/OpenMPT-1.30/src/mpt/base/detect_os.hpp Fri Jan 3 21:57:54 2025 (r22759) +++ branches/OpenMPT-1.30/src/mpt/base/detect_os.hpp Fri Jan 3 21:58:48 2025 (r22760) @@ -24,6 +24,10 @@ #error "Emscripten >= 1.39.7 is required." #endif #endif +#elif defined(__CYGWIN__) +#define MPT_OS_CYGWIN 1 + + #elif defined(_WIN32) #define MPT_OS_WINDOWS 1 #if defined(WINAPI_FAMILY) @@ -75,6 +79,9 @@ #ifndef MPT_OS_EMSCRIPTEN #define MPT_OS_EMSCRIPTEN 0 #endif +#ifndef MPT_OS_CYGWIN +#define MPT_OS_CYGWIN 0 +#endif #ifndef MPT_OS_WINDOWS #define MPT_OS_WINDOWS 0 #endif |
From: <sv...@op...> - 2025-01-03 20:58:06
|
Author: manx Date: Fri Jan 3 21:57:54 2025 New Revision: 22759 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22759 Log: Merged revision(s) 22750 from trunk/OpenMPT: [Fix] mpt/string_transcode/transcode.hpp: Try to work-around Cygwin locale handling problems the same way we did in libopenmpt 0.5.x and earlier. See <https://cygwin.com/cgit/cygwin-packages/libopenmpt/tree/libopenmpt-0.7.12-1.src.patch?id=c4baa491e8a0975a1c7e0dfdf5ddf208d5b4ba6b>. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/src/mpt/string_transcode/transcode.hpp Modified: branches/OpenMPT-1.31/src/mpt/string_transcode/transcode.hpp ============================================================================== --- branches/OpenMPT-1.31/src/mpt/string_transcode/transcode.hpp Fri Jan 3 21:57:25 2025 (r22758) +++ branches/OpenMPT-1.31/src/mpt/string_transcode/transcode.hpp Fri Jan 3 21:57:54 2025 (r22759) @@ -11,6 +11,7 @@ #include "mpt/base/namespace.hpp" #include "mpt/base/saturate_cast.hpp" #include "mpt/detect/mfc.hpp" +#include "mpt/out_of_memory/out_of_memory.hpp" #include "mpt/string/types.hpp" #include "mpt/string/utility.hpp" @@ -1664,10 +1665,60 @@ #elif !defined(MPT_COMPILER_QUIRK_NO_WCHAR) switch (encoding) { case logical_encoding::locale: +#if defined(MPT_LIBCXX_QUIRK_BROKEN_USER_LOCALE) + try { + return encode_locale<Tdststring>(std::locale(""), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return encode_locale<Tdststring>(std::locale(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return encode_locale<Tdststring>(std::locale::classic(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + return encode_ascii<Tdststring>(src); +#else return encode_locale<Tdststring>(std::locale(""), src); +#endif break; case logical_encoding::active_locale: +#if defined(MPT_LIBCXX_QUIRK_BROKEN_ACTIVE_LOCALE) + try { + return encode_locale<Tdststring>(std::locale(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return encode_locale<Tdststring>(std::locale(""), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return encode_locale<Tdststring>(std::locale::classic(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + return encode_ascii<Tdststring>(src); +#else return encode_locale<Tdststring>(std::locale(), src); +#endif break; } throw std::domain_error("unsupported encoding"); @@ -1835,10 +1886,60 @@ #elif !defined(MPT_COMPILER_QUIRK_NO_WCHAR) switch (encoding) { case logical_encoding::locale: +#if defined(MPT_LIBCXX_QUIRK_BROKEN_USER_LOCALE) + try { + return decode_locale(std::locale(""), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return decode_locale(std::locale(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return decode_locale(std::locale::classic(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + return decode_ascii(src); +#else return decode_locale(std::locale(""), src); +#endif break; case logical_encoding::active_locale: +#if defined(MPT_LIBCXX_QUIRK_BROKEN_USER_LOCALE) + try { + return decode_locale(std::locale(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return decode_locale(std::locale(""), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return decode_locale(std::locale::classic(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + return decode_ascii(src); +#else return decode_locale(std::locale(), src); +#endif break; } throw std::domain_error("unsupported encoding"); |
From: <sv...@op...> - 2025-01-03 20:57:52
|
Author: manx Date: Fri Jan 3 21:57:25 2025 New Revision: 22758 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22758 Log: Merged revision(s) 22744 from trunk/OpenMPT: [Ref] mpt/base/detect_quirks.hpp: Add MPT_LIBCXX_QUIRK_BROKEN_USER_LOCALE and MPT_LIBCXX_QUIRK_BROKEN_ACTIVE_LOCALE for Cygwin. See <https://cygwin.com/cgit/cygwin-packages/libopenmpt/tree/libopenmpt-0.7.12-1.src.patch?id=c4baa491e8a0975a1c7e0dfdf5ddf208d5b4ba6b>. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp Modified: branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp ============================================================================== --- branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp Fri Jan 3 21:56:51 2025 (r22757) +++ branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp Fri Jan 3 21:57:25 2025 (r22758) @@ -241,6 +241,16 @@ +#if MPT_OS_CYGWIN +#define MPT_LIBCXX_QUIRK_BROKEN_USER_LOCALE +#endif + + + +// #define MPT_LIBCXX_QUIRK_BROKEN_ACTIVE_LOCALE + + + #if MPT_CXX_AT_LEAST(20) // Clang 14 is incompatible with libstdc++ 13 in C++20 mode #if MPT_CLANG_BEFORE(15, 0, 0) && MPT_LIBCXX_GNU_AT_LEAST(13) |
From: <sv...@op...> - 2025-01-03 20:56:58
|
Author: manx Date: Fri Jan 3 21:56:51 2025 New Revision: 22757 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22757 Log: Merged revision(s) 22743 from trunk/OpenMPT: [Ref] mpt/base/detect_os.hpp: Add MPT_OS_CYGWIN detection. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/src/mpt/base/detect_os.hpp Modified: branches/OpenMPT-1.31/src/mpt/base/detect_os.hpp ============================================================================== --- branches/OpenMPT-1.31/src/mpt/base/detect_os.hpp Fri Jan 3 21:55:51 2025 (r22756) +++ branches/OpenMPT-1.31/src/mpt/base/detect_os.hpp Fri Jan 3 21:56:51 2025 (r22757) @@ -93,6 +93,10 @@ #endif +#elif defined(__CYGWIN__) +#define MPT_OS_CYGWIN 1 + + #elif defined(_WIN32) #define MPT_OS_WINDOWS 1 #if !defined(_WIN32_WINDOWS) && !defined(WINVER) @@ -379,6 +383,9 @@ #ifndef MPT_OS_EMSCRIPTEN #define MPT_OS_EMSCRIPTEN 0 #endif +#ifndef MPT_OS_CYGWIN +#define MPT_OS_CYGWIN 0 +#endif #ifndef MPT_OS_WINDOWS #define MPT_OS_WINDOWS 0 #endif |
From: <sv...@op...> - 2025-01-03 20:55:58
|
Author: manx Date: Fri Jan 3 21:55:51 2025 New Revision: 22756 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22756 Log: [Imp] build: Makefile: Add basic Cygwin support (without auto-detection). Added: trunk/OpenMPT/build/make/config-cygwin.mk (contents, props changed) Modified: trunk/OpenMPT/build/make/config-defaults.mk Added: trunk/OpenMPT/build/make/config-cygwin.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/OpenMPT/build/make/config-cygwin.mk Fri Jan 3 21:55:51 2025 (r22756) @@ -0,0 +1,88 @@ + +ifeq ($(origin CC),default) +CC = $(TOOLCHAIN_PREFIX)gcc$(TOOLCHAIN_SUFFIX) +endif +ifeq ($(origin CXX),default) +CXX = $(TOOLCHAIN_PREFIX)g++$(TOOLCHAIN_SUFFIX) +endif +ifeq ($(origin LD),default) +LD = $(CXX) +endif +ifeq ($(origin AR),default) +AR = $(TOOLCHAIN_PREFIX)ar$(TOOLCHAIN_SUFFIX) +endif + +ifneq ($(STDCXX),) +CXXFLAGS_STDCXX = -std=$(STDCXX) -fexceptions -frtti -pthread +else ifeq ($(shell printf '\n' > bin/empty.cpp ; if $(CXX) -std=c++23 -c bin/empty.cpp -o bin/empty.out > /dev/null 2>&1 ; then echo 'c++23' ; fi ), c++23) +CXXFLAGS_STDCXX = -std=c++23 -fexceptions -frtti -pthread +else ifeq ($(shell printf '\n' > bin/empty.cpp ; if $(CXX) -std=c++20 -c bin/empty.cpp -o bin/empty.out > /dev/null 2>&1 ; then echo 'c++20' ; fi ), c++20) +CXXFLAGS_STDCXX = -std=c++20 -fexceptions -frtti -pthread +else +CXXFLAGS_STDCXX = -std=c++17 -fexceptions -frtti -pthread +endif +ifneq ($(STDC),) +CFLAGS_STDC = -std=$(STDC) -pthread +else ifeq ($(shell printf '\n' > bin/empty.c ; if $(CC) -std=c23 -c bin/empty.c -o bin/empty.out > /dev/null 2>&1 ; then echo 'c23' ; fi ), c23) +CFLAGS_STDC = -std=c23 -pthread +else ifeq ($(shell printf '\n' > bin/empty.c ; if $(CC) -std=c18 -c bin/empty.c -o bin/empty.out > /dev/null 2>&1 ; then echo 'c18' ; fi ), c18) +CFLAGS_STDC = -std=c18 -pthread +else ifeq ($(shell printf '\n' > bin/empty.c ; if $(CC) -std=c17 -c bin/empty.c -o bin/empty.out > /dev/null 2>&1 ; then echo 'c17' ; fi ), c17) +CFLAGS_STDC = -std=c17 -pthread +else +CFLAGS_STDC = -std=c11 -pthread +endif +CXXFLAGS += $(CXXFLAGS_STDCXX) +CFLAGS += $(CFLAGS_STDC) +LDFLAGS += -pthread + +CPPFLAGS += +CXXFLAGS += -fPIC +CFLAGS += -fPIC +LDFLAGS += +LDLIBS += -lm +ARFLAGS := rcs + +ifeq ($(NATIVE),1) +CXXFLAGS += -march=native +CFLAGS += -march=native +endif + +ifeq ($(MODERN),1) +LDFLAGS += -fuse-ld=gold +endif + +ifeq ($(OPTIMIZE_LTO),1) +CXXFLAGS += -flto +CFLAGS += -flto +endif + +ifeq ($(ANALYZE),1) +CXXFLAGS += -fanalyzer -Wno-analyzer-malloc-leak -Wno-analyzer-null-dereference -Wno-analyzer-possible-null-argument -Wno-analyzer-possible-null-dereference +CFLAGS += -fanalyzer -Wno-analyzer-malloc-leak -Wno-analyzer-null-dereference -Wno-analyzer-possible-null-argument -Wno-analyzer-possible-null-dereference +endif + +ifeq ($(CHECKED_ADDRESS),1) +CXXFLAGS += -fsanitize=address +CFLAGS += -fsanitize=address +endif + +ifeq ($(CHECKED_UNDEFINED),1) +CXXFLAGS += -fsanitize=undefined +CFLAGS += -fsanitize=undefined +endif + +include build/make/warnings-gcc.mk + +EXESUFFIX=.exe +SOSUFFIX=.dll +SOSUFFIXWINDOWS=1 + +ALLOW_LGPL=0 + +DYNLINK=0 +SHARED_LIB=1 +STATIC_LIB=0 +SHARED_SONAME=0 + +ENABLE_DLL=1 Modified: trunk/OpenMPT/build/make/config-defaults.mk ============================================================================== --- trunk/OpenMPT/build/make/config-defaults.mk Fri Jan 3 21:33:56 2025 (r22755) +++ trunk/OpenMPT/build/make/config-defaults.mk Fri Jan 3 21:55:51 2025 (r22756) @@ -25,6 +25,10 @@ include build/make/config-mingw-w64.mk endif +else ifeq ($(HOST_FLAVOUR),CYGWIN) + +include build/make/config-cygwin.mk + else ifeq ($(HOST_FLAVOUR),LINUX) include build/make/config-gcc.mk |
From: <sv...@op...> - 2025-01-03 20:34:08
|
Author: sagamusix Date: Fri Jan 3 21:33:56 2025 New Revision: 22755 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22755 Log: [Imp] Pattern tab: Draw channel and row headers off-screen even when not using smooth scrolling. This avoids flicker on the text of those buttons when switching between patterns. Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Draw_pat.cpp Fri Jan 3 17:12:14 2025 (r22754) +++ trunk/OpenMPT/mptrack/Draw_pat.cpp Fri Jan 3 21:33:56 2025 (r22755) @@ -549,9 +549,10 @@ const int lineWidth = HighDPISupport::ScalePixels(1, *this); GetClientRect(&rcClient); + CRect clipRect; + pDC->GetClipBox(clipRect); HDC hdc; - HBITMAP oldBitmap = nullptr; if(doSmoothScroll) { if(rcClient != m_oldClient) @@ -563,11 +564,21 @@ m_oldClient = rcClient; } hdc = m_offScreenDC; - oldBitmap = SelectBitmap(hdc, m_offScreenBitmap); } else { + // Off-screen DC for drawing horizontal (channel buttons) and vertical (row number buttons) headers to avoid flicker + CRect buttonRect{0, 0, rcClient.Width(), std::max(m_szHeader.cy, m_szCell.cy)}; + if(buttonRect.Width() > m_oldClient.Width() || buttonRect.Height() > m_oldClient.Height()) + { + m_offScreenBitmap.DeleteObject(); + m_offScreenDC.DeleteDC(); + m_offScreenDC.CreateCompatibleDC(pDC); + m_offScreenBitmap.CreateCompatibleBitmap(pDC, buttonRect.Width(), buttonRect.Height()); + m_oldClient = buttonRect; + } hdc = pDC->m_hDC; } + HBITMAP oldBitmap = SelectBitmap(m_offScreenDC, m_offScreenBitmap); const auto dcBrush = GetStockBrush(DC_BRUSH); const auto faceColor = GetSysColor(COLOR_BTNFACE); @@ -577,9 +588,8 @@ CHANNELINDEX xofs = static_cast<CHANNELINDEX>(GetXScrollPos()); ROWINDEX yofs = static_cast<ROWINDEX>(GetYScrollPos()); const CSoundFile &sndFile = pModDoc->GetSoundFile(); - UINT nColumnWidth = m_szCell.cx; - UINT ncols = sndFile.GetNumChannels(); - int xpaint = m_szHeader.cx; + const UINT nColumnWidth = m_szCell.cx; + const UINT numChannels = sndFile.GetNumChannels(); int ypaint = rcClient.top + m_szHeader.cy - GetSmoothScrollOffset(); const auto &order = Order(); const ORDERINDEX ordCount = Order().GetLength(); @@ -614,7 +624,7 @@ ROWINDEX n = std::min(static_cast<ROWINDEX>(nSkip), nPrevRows); ypaint += (nSkip - n) * m_szCell.cy; - rect.SetRect(0, m_szHeader.cy, nColumnWidth * ncols + m_szHeader.cx, ypaint - 1); + rect.SetRect(0, m_szHeader.cy, nColumnWidth * numChannels + m_szHeader.cx, ypaint - 1); m_Dib.SetBlendMode(true); DrawPatternData(hdc, lineWidth, nPrevPat, false, false, nPrevRows - n, nPrevRows, xofs, rcClient, &ypaint); @@ -622,7 +632,7 @@ } else { ypaint += nSkip * m_szCell.cy; - rect.SetRect(0, m_szHeader.cy, nColumnWidth * ncols + m_szHeader.cx, ypaint - 1); + rect.SetRect(0, m_szHeader.cy, nColumnWidth * numChannels + m_szHeader.cx, ypaint - 1); } if ((rect.bottom > rect.top) && (rect.right > rect.left)) { @@ -669,7 +679,7 @@ } } // Drawing outside pattern area - xpaint = m_szHeader.cx + (ncols - xofs) * nColumnWidth; + int xpaint = m_szHeader.cx + (numChannels - xofs) * nColumnWidth; if ((xpaint < rcClient.right) && (ypaint > rcClient.top)) { rc.SetRect(xpaint, rcClient.top, rcClient.right, ypaint); @@ -692,40 +702,43 @@ } const auto buttonBrush = GetSysColorBrush(COLOR_BTNFACE), blackBrush = GetStockBrush(BLACK_BRUSH); - UINT ncolhdr = xofs; - xpaint = m_szHeader.cx; - ypaint = rcClient.top; rect.SetRect(0, rcClient.top, rcClient.right, rcClient.top + m_szHeader.cy); - if(::RectVisible(hdc, &rect)) + if(pDC->RectVisible(rect)) { sprintf(s, "#%u", m_nPattern); rect.right = m_szHeader.cx; - DrawButtonRect(hdc, lineWidth, rect, s, false, - m_bInItemRect && m_nDragItem.Type() == DragItem::PatternHeader); - - const int dropWidth = HighDPISupport::ScalePixels(2, m_hWnd); + if(pDC->RectVisible(rect)) + { + DrawButtonRect(m_offScreenDC, lineWidth, rect, s, false, + m_bInItemRect && m_nDragItem.Type() == DragItem::PatternHeader); + } // Drawing Channel Headers - while (xpaint < rcClient.right) + const int dropWidth = HighDPISupport::ScalePixels(2, m_hWnd); + UINT chn = xofs; + ypaint = rcClient.top; + for(xpaint = m_szHeader.cx; xpaint < clipRect.right; xpaint += nColumnWidth, chn++) { rect.SetRect(xpaint, ypaint, xpaint + nColumnWidth, ypaint + m_szHeader.cy); - if (ncolhdr < ncols) + if(chn < numChannels) { - const auto &channel = sndFile.ChnSettings[ncolhdr]; - const auto recordGroup = pModDoc->GetChannelRecordGroup(static_cast<CHANNELINDEX>(ncolhdr)); - const char *pszfmt = sndFile.m_bChannelMuteTogglePending[ncolhdr]? "[Channel %u]" : "Channel %u"; + if(!pDC->RectVisible(rect)) + continue; + const auto &channel = sndFile.ChnSettings[chn]; + const auto recordGroup = pModDoc->GetChannelRecordGroup(static_cast<CHANNELINDEX>(chn)); + const char *pszfmt = sndFile.m_bChannelMuteTogglePending[chn]? "[Channel %u]" : "Channel %u"; if(channel.szName[0] != 0) - pszfmt = sndFile.m_bChannelMuteTogglePending[ncolhdr] ? "%u: [%s]" : "%u: %s"; + pszfmt = sndFile.m_bChannelMuteTogglePending[chn] ? "%u: [%s]" : "%u: %s"; else if(const auto numVisibleColums = m_visibleColumns.count(); numVisibleColums < 2) - pszfmt = sndFile.m_bChannelMuteTogglePending[ncolhdr] ? "[%u]" : "%u"; + pszfmt = sndFile.m_bChannelMuteTogglePending[chn] ? "[%u]" : "%u"; else if(numVisibleColums < 3) - pszfmt = sndFile.m_bChannelMuteTogglePending[ncolhdr] ? "[Ch%u]" : "Ch%u"; + pszfmt = sndFile.m_bChannelMuteTogglePending[chn] ? "[Ch%u]" : "Ch%u"; else if(numVisibleColums < 5) - pszfmt = sndFile.m_bChannelMuteTogglePending[ncolhdr] ? "[Chn %u]" : "Chn %u"; - sprintf(s, pszfmt, ncolhdr + 1, channel.szName.buf); - DrawButtonRect(hdc, lineWidth, rect, s, + pszfmt = sndFile.m_bChannelMuteTogglePending[chn] ? "[Chn %u]" : "Chn %u"; + sprintf(s, pszfmt, chn + 1, channel.szName.buf); + DrawButtonRect(m_offScreenDC, lineWidth, rect, s, channel.dwFlags[CHN_MUTE], - m_bInItemRect && m_nDragItem.Type() == DragItem::ChannelHeader && m_nDragItem.Value() == ncolhdr, + m_bInItemRect && m_nDragItem.Type() == DragItem::ChannelHeader && m_nDragItem.Value() == chn, recordGroup != RecordGroup::NoGroup ? DT_RIGHT : DT_CENTER, chanColorHeight); if(channel.color != ModChannelSettings::INVALID_COLOR) @@ -737,15 +750,15 @@ r.left = rect.left + chanColorOffset; r.right = rect.right - chanColorOffset; - ::SetDCBrushColor(hdc, channel.color); - ::FillRect(hdc, r, dcBrush); + ::SetDCBrushColor(m_offScreenDC, channel.color); + ::FillRect(m_offScreenDC, r, dcBrush); } // When dragging around channel headers, mark insertion position if(m_Status[psDragging] && !m_bInItemRect && m_nDragItem.Type() == DragItem::ChannelHeader && m_nDropItem.Type() == DragItem::ChannelHeader - && m_nDropItem.Value() == ncolhdr) + && m_nDropItem.Value() == chn) { CRect r; r.top = rect.top; @@ -754,8 +767,8 @@ r.left = (m_nDropItem.Value() < m_nDragItem.Value() || m_Status[psShiftDragging]) ? rect.left : rect.right - dropWidth; r.right = r.left + dropWidth; - ::SetDCBrushColor(hdc, textColor); - ::FillRect(hdc, r, dcBrush); + ::SetDCBrushColor(m_offScreenDC, textColor); + ::FillRect(m_offScreenDC, r, dcBrush); } rect.bottom = rect.top + colHeight; @@ -765,18 +778,18 @@ { CRect insRect; insRect.SetRect(xpaint, ypaint + chanColorHeight, xpaint + nColumnWidth / 8 + recordInsX, ypaint + colHeight); - FrameRect(hdc, &rect, buttonBrush); - InvertRect(hdc, &rect); + FrameRect(m_offScreenDC, &rect, buttonBrush); + InvertRect(m_offScreenDC, &rect); s[0] = (recordGroup == RecordGroup::Group1) ? '1' : '2'; s[1] = '\0'; - DrawButtonRect(hdc, lineWidth, insRect, s, false, false, DT_CENTER); - FrameRect(hdc, &insRect, blackBrush); + DrawButtonRect(m_offScreenDC, lineWidth, insRect, s, false, false, DT_CENTER); + FrameRect(m_offScreenDC, &insRect, blackBrush); } if(m_Status[psShowVUMeters]) { - m_chnState[ncolhdr].vuMeterOld = 0; - DrawChannelVUMeter(hdc, rect.left, rect.bottom, ncolhdr); + m_chnState[chn].vuMeterOld = 0; + DrawChannelVUMeter(m_offScreenDC, rect.left, rect.bottom, chn); rect.top += vuHeight; rect.bottom += vuHeight; } @@ -788,25 +801,26 @@ sprintf(s, "%u: %s", mixPlug, (sndFile.m_MixPlugins[mixPlug - 1]).pMixPlugin ? sndFile.m_MixPlugins[mixPlug - 1].GetNameLocale() : "[empty]"); else sprintf(s, "---"); - DrawButtonRect(hdc, lineWidth, rect, s, channel.dwFlags[CHN_NOFX], - m_bInItemRect && (m_nDragItem.Type() == DragItem::PluginName) && (m_nDragItem.Value() == ncolhdr), DT_CENTER); + DrawButtonRect(m_offScreenDC, lineWidth, rect, s, channel.dwFlags[CHN_NOFX], + m_bInItemRect && (m_nDragItem.Type() == DragItem::PluginName) && (m_nDragItem.Value() == chn), DT_CENTER); } - - } else break; - ncolhdr++; - xpaint += nColumnWidth; + } else + { + break; + } + } + if(!doSmoothScroll) + { + pDC->BitBlt(clipRect.left, clipRect.top, xpaint - clipRect.left, m_szHeader.cy - clipRect.top, &m_offScreenDC, clipRect.left, clipRect.top, SRCCOPY); } } if(doSmoothScroll) { - CRect clipRect; - pDC->GetClipBox(clipRect); pDC->BitBlt(clipRect.left, clipRect.top, clipRect.Width(), clipRect.Height(), &m_offScreenDC, clipRect.left, clipRect.top, SRCCOPY); - SelectBitmap(m_offScreenDC, oldBitmap); } + SelectBitmap(m_offScreenDC, oldBitmap); - //rewbs.fxVis if (m_pEffectVis) { //HACK: Update visualizer on every pattern redraw. Cleary there's space for opt here. @@ -915,13 +929,22 @@ rect.right = rect.left + m_szHeader.cx; const bool rowDisabled = sndFile.m_lockRowStart != ROWINDEX_INVALID && (row < sndFile.m_lockRowStart || row > sndFile.m_lockRowEnd); - TCHAR s[32]; - if(hexNumbers) - wsprintf(s, _T("%s%02X"), compRow < 0 ? _T("-") : _T(""), std::abs(compRow)); - else - wsprintf(s, _T("%d"), compRow); + // Draw button with row number + { + TCHAR s[32]; + if(hexNumbers) + wsprintf(s, _T("%s%02X"), compRow < 0 ? _T("-") : _T(""), std::abs(compRow)); + else + wsprintf(s, _T("%d"), compRow); + + // We already draw to the off-screen buffer in case of smooth scrolling + const bool drawOffscreen = !patternSetupFlags[PatternSetup::SmoothScrolling]; + const CRect drawRect = drawOffscreen ? CRect{0, 0, rect.Width(), rect.Height()} : rect; + DrawButtonRect(drawOffscreen ? m_offScreenDC : hdc, lineWidth, drawRect, s, !selEnable || rowDisabled); + if(drawOffscreen) + ::BitBlt(hdc, rect.left, rect.top, rect.Width(), rect.Height(), m_offScreenDC, 0, 0, SRCCOPY); + } - DrawButtonRect(hdc, lineWidth, rect, s, !selEnable || rowDisabled); oldrowcolor = EncodeRowColor(row_bkcol, row_col, bRowSel); bRowSel = (m_Selection.ContainsVertical(PatternCursor(row))); row_col = MODCOLOR_TEXTNORMAL; |
From: <sv...@op...> - 2025-01-03 16:12:21
|
Author: manx Date: Fri Jan 3 17:12:14 2025 New Revision: 22754 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22754 Log: [Doc] libopenmpt: Update changelog. Modified: branches/OpenMPT-1.28/libopenmpt/dox/changelog.md Modified: branches/OpenMPT-1.28/libopenmpt/dox/changelog.md ============================================================================== --- branches/OpenMPT-1.28/libopenmpt/dox/changelog.md Fri Jan 3 17:12:07 2025 (r22753) +++ branches/OpenMPT-1.28/libopenmpt/dox/changelog.md Fri Jan 3 17:12:14 2025 (r22754) @@ -8,7 +8,7 @@ ### libopenmpt 0.4.48-pre * mpg123: Update to v1.32.10 (2024-12-14). - * XMPlay SDK: Update to 2025-01-02. + * XMPlay SDK: Update to 2025-01-03. ### libopenmpt 0.4.47 (2024-12-01) |
From: <sv...@op...> - 2025-01-03 16:12:18
|
Author: manx Date: Fri Jan 3 17:12:07 2025 New Revision: 22753 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22753 Log: [Doc] libopenmpt: Update changelog. Modified: branches/OpenMPT-1.29/libopenmpt/dox/changelog.md Modified: branches/OpenMPT-1.29/libopenmpt/dox/changelog.md ============================================================================== --- branches/OpenMPT-1.29/libopenmpt/dox/changelog.md Fri Jan 3 17:11:57 2025 (r22752) +++ branches/OpenMPT-1.29/libopenmpt/dox/changelog.md Fri Jan 3 17:12:07 2025 (r22753) @@ -8,7 +8,7 @@ ### libopenmpt 0.5.36-pre * mpg123: Update to v1.32.10 (2024-12-14). - * XMPlay SDK: Update to 2025-01-02. + * XMPlay SDK: Update to 2025-01-03. ### libopenmpt 0.5.35 (2024-12-01) |
From: <sv...@op...> - 2025-01-03 16:12:09
|
Author: manx Date: Fri Jan 3 17:11:57 2025 New Revision: 22752 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22752 Log: [Doc] libopenmpt: Update changelog. Modified: branches/OpenMPT-1.30/libopenmpt/dox/changelog.md Modified: branches/OpenMPT-1.30/libopenmpt/dox/changelog.md ============================================================================== --- branches/OpenMPT-1.30/libopenmpt/dox/changelog.md Fri Jan 3 17:11:40 2025 (r22751) +++ branches/OpenMPT-1.30/libopenmpt/dox/changelog.md Fri Jan 3 17:11:57 2025 (r22752) @@ -8,7 +8,7 @@ ### libopenmpt 0.6.22-pre * mpg123: Update to v1.32.10 (2024-12-14). - * XMPlay SDK: Update to 2025-01-02. + * XMPlay SDK: Update to 2025-01-03. ### libopenmpt 0.6.21 (2024-12-01) |
From: <sv...@op...> - 2025-01-03 16:11:53
|
Author: manx Date: Fri Jan 3 17:11:40 2025 New Revision: 22751 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22751 Log: [Doc] libopenmpt: Update changelog. Modified: branches/OpenMPT-1.31/doc/libopenmpt/changelog.md Modified: branches/OpenMPT-1.31/doc/libopenmpt/changelog.md ============================================================================== --- branches/OpenMPT-1.31/doc/libopenmpt/changelog.md Fri Jan 3 17:10:37 2025 (r22750) +++ branches/OpenMPT-1.31/doc/libopenmpt/changelog.md Fri Jan 3 17:11:40 2025 (r22751) @@ -8,7 +8,7 @@ ### libopenmpt 0.7.13-pre * mpg123: Update to v1.32.10 (2024-12-14). - * XMPlay SDK: Update to 2025-01-02. + * XMPlay SDK: Update to 2025-01-03. ### libopenmpt 0.7.12 (2024-12-01) |
From: <sv...@op...> - 2025-01-03 16:10:44
|
Author: manx Date: Fri Jan 3 17:10:37 2025 New Revision: 22750 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22750 Log: [Fix] mpt/string_transcode/transcode.hpp: Try to work-around Cygwin locale handling problems the same way we did in libopenmpt 0.5.x and earlier. See <https://cygwin.com/cgit/cygwin-packages/libopenmpt/tree/libopenmpt-0.7.12-1.src.patch?id=c4baa491e8a0975a1c7e0dfdf5ddf208d5b4ba6b>. Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Fri Jan 3 17:09:33 2025 (r22749) +++ trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Fri Jan 3 17:10:37 2025 (r22750) @@ -11,6 +11,7 @@ #include "mpt/base/namespace.hpp" #include "mpt/base/saturate_cast.hpp" #include "mpt/detect/mfc.hpp" +#include "mpt/out_of_memory/out_of_memory.hpp" #include "mpt/string/types.hpp" #include "mpt/string/utility.hpp" @@ -1694,10 +1695,60 @@ #elif !defined(MPT_COMPILER_QUIRK_NO_WCHAR) switch (encoding) { case logical_encoding::locale: +#if defined(MPT_LIBCXX_QUIRK_BROKEN_USER_LOCALE) + try { + return encode_locale<Tdststring>(std::locale(""), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return encode_locale<Tdststring>(std::locale(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return encode_locale<Tdststring>(std::locale::classic(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + return encode_ascii<Tdststring>(src); +#else return encode_locale<Tdststring>(std::locale(""), src); +#endif break; case logical_encoding::active_locale: +#if defined(MPT_LIBCXX_QUIRK_BROKEN_ACTIVE_LOCALE) + try { + return encode_locale<Tdststring>(std::locale(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return encode_locale<Tdststring>(std::locale(""), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return encode_locale<Tdststring>(std::locale::classic(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + return encode_ascii<Tdststring>(src); +#else return encode_locale<Tdststring>(std::locale(), src); +#endif break; } throw std::domain_error("unsupported encoding"); @@ -1865,10 +1916,60 @@ #elif !defined(MPT_COMPILER_QUIRK_NO_WCHAR) switch (encoding) { case logical_encoding::locale: +#if defined(MPT_LIBCXX_QUIRK_BROKEN_USER_LOCALE) + try { + return decode_locale(std::locale(""), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return decode_locale(std::locale(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return decode_locale(std::locale::classic(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + return decode_ascii(src); +#else return decode_locale(std::locale(""), src); +#endif break; case logical_encoding::active_locale: +#if defined(MPT_LIBCXX_QUIRK_BROKEN_USER_LOCALE) + try { + return decode_locale(std::locale(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return decode_locale(std::locale(""), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + try { + return decode_locale(std::locale::classic(), src); + } catch (mpt::out_of_memory e) { + mpt::rethrow_out_of_memory(e); + } catch (...) { + // nothing + } + return decode_ascii(src); +#else return decode_locale(std::locale(), src); +#endif break; } throw std::domain_error("unsupported encoding"); |
From: <sv...@op...> - 2025-01-03 16:10:02
|
Author: manx Date: Fri Jan 3 17:09:33 2025 New Revision: 22749 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22749 Log: [Var] Update XMPlay SDK to 2025-01-03. See r22745. Modified: branches/OpenMPT-1.28/build/download_externals.cmd Modified: branches/OpenMPT-1.28/build/download_externals.cmd ============================================================================== --- branches/OpenMPT-1.28/build/download_externals.cmd Fri Jan 3 17:08:43 2025 (r22748) +++ branches/OpenMPT-1.28/build/download_externals.cmd Fri Jan 3 17:09:33 2025 (r22749) @@ -42,7 +42,7 @@ powershell -ExecutionPolicy Unrestricted .\build\scriptlib\Verify-File.ps1 -hashvalue 99d468de185dd62aba845410babe04f70bc4a32ea71a86763c8ad1b8adb04d8425a8cf2e8c581b3e42bc555abc27facd07862ef74b4c322db26c9f388b2f44c4 -filesize 141049 -filename build/externals/innounp048.rar || del /Q build\externals\innounp048.rar powershell -ExecutionPolicy Unrestricted .\build\scriptlib\Verify-File.ps1 -hashvalue 406bd108bb16450ad34d49a0c8111bdfbed4efef4923ba3f1ee8c437ca9ea4e8b453c5a2d298ac69a79a22a9309a83403954d271d26f051f26dc5e7b5ac65b6f -filesize 5565797 -filename build/externals/premake-5.0.0-alpha13-src.zip || del /Q build\externals\premake-5.0.0-alpha13-src.zip powershell -ExecutionPolicy Unrestricted .\build\scriptlib\Verify-File.ps1 -hashvalue 394375db8a16bf155b5de9376f6290488ab339e503dbdfdc4e2f5bede967799e625c559cca363bc988324f1a8e86e5fd28a9f697422abd7bb3dcde4a766607b5 -filesize 336166 -filename build/externals/WA5.55_SDK.exe || del /Q build\externals\WA5.55_SDK.exe - powershell -ExecutionPolicy Unrestricted .\build\scriptlib\Verify-File.ps1 -hashvalue c0b872a5a9a9f6f42089550b356d783daaeb469b79d94bb6795bc7dcadac61c639bfb619e6c9e88f541df4573e5ef0099ca9cfb7204c5205f3fc6b4eb7e61450 -filesize 322848 -filename build/externals/xmp-sdk.zip || del /Q build\externals\xmp-sdk.zip + powershell -ExecutionPolicy Unrestricted .\build\scriptlib\Verify-File.ps1 -hashvalue 67b96c6e6aa794e9de4f446d23f969e3591457196fd100c5475f5df52308de861a0c411db54fcb2bf46a12e9136ddda9d2974a5167432a979a701ef2c4679ef9 -filesize 322903 -filename build/externals/xmp-sdk.zip || del /Q build\externals\xmp-sdk.zip ) call build\scriptlib\download.cmd "https://www.7-zip.org/a/7za920.zip" "build\externals\7za920.zip" || goto error @@ -76,7 +76,7 @@ powershell -ExecutionPolicy Unrestricted .\build\scriptlib\Verify-File.ps1 -hashvalue 99d468de185dd62aba845410babe04f70bc4a32ea71a86763c8ad1b8adb04d8425a8cf2e8c581b3e42bc555abc27facd07862ef74b4c322db26c9f388b2f44c4 -filesize 141049 -filename build/externals/innounp048.rar || goto error powershell -ExecutionPolicy Unrestricted .\build\scriptlib\Verify-File.ps1 -hashvalue 406bd108bb16450ad34d49a0c8111bdfbed4efef4923ba3f1ee8c437ca9ea4e8b453c5a2d298ac69a79a22a9309a83403954d271d26f051f26dc5e7b5ac65b6f -filesize 5565797 -filename build/externals/premake-5.0.0-alpha13-src.zip || goto error powershell -ExecutionPolicy Unrestricted .\build\scriptlib\Verify-File.ps1 -hashvalue 394375db8a16bf155b5de9376f6290488ab339e503dbdfdc4e2f5bede967799e625c559cca363bc988324f1a8e86e5fd28a9f697422abd7bb3dcde4a766607b5 -filesize 336166 -filename build/externals/WA5.55_SDK.exe || goto error -powershell -ExecutionPolicy Unrestricted .\build\scriptlib\Verify-File.ps1 -hashvalue c0b872a5a9a9f6f42089550b356d783daaeb469b79d94bb6795bc7dcadac61c639bfb619e6c9e88f541df4573e5ef0099ca9cfb7204c5205f3fc6b4eb7e61450 -filesize 322848 -filename build/externals/xmp-sdk.zip || goto error +powershell -ExecutionPolicy Unrestricted .\build\scriptlib\Verify-File.ps1 -hashvalue 67b96c6e6aa794e9de4f446d23f969e3591457196fd100c5475f5df52308de861a0c411db54fcb2bf46a12e9136ddda9d2974a5167432a979a701ef2c4679ef9 -filesize 322903 -filename build/externals/xmp-sdk.zip || goto error call :killdir "build\tools\7zipold" || goto error call :killdir "build\tools\7zipa" || goto error |
From: <sv...@op...> - 2025-01-03 16:08:55
|
Author: manx Date: Fri Jan 3 17:08:43 2025 New Revision: 22748 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22748 Log: Merged revision(s) 22747 from branches/OpenMPT-1.30: Merged revision(s) 22746 from branches/OpenMPT-1.31: [Var] Update XMPlay SDK to 2025-01-03. See r22745. ........ ........ Modified: branches/OpenMPT-1.29/ (props changed) branches/OpenMPT-1.29/build/download_externals.cmd Modified: branches/OpenMPT-1.29/build/download_externals.cmd ============================================================================== --- branches/OpenMPT-1.29/build/download_externals.cmd Fri Jan 3 17:07:54 2025 (r22747) +++ branches/OpenMPT-1.29/build/download_externals.cmd Fri Jan 3 17:08:43 2025 (r22748) @@ -38,7 +38,7 @@ call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://web.archive.org/web/20131217072017id_/http://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" "build\externals\WA5.55_SDK.exe" 394375db8a16bf155b5de9376f6290488ab339e503dbdfdc4e2f5bede967799e625c559cca363bc988324f1a8e86e5fd28a9f697422abd7bb3dcde4a766607b5 336166 || goto error -call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://www.un4seen.com/files/xmp-sdk.zip" "build\externals\xmp-sdk.zip" c0b872a5a9a9f6f42089550b356d783daaeb469b79d94bb6795bc7dcadac61c639bfb619e6c9e88f541df4573e5ef0099ca9cfb7204c5205f3fc6b4eb7e61450 322848 || goto error +call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://www.un4seen.com/files/xmp-sdk.zip" "build\externals\xmp-sdk.zip" 67b96c6e6aa794e9de4f446d23f969e3591457196fd100c5475f5df52308de861a0c411db54fcb2bf46a12e9136ddda9d2974a5167432a979a701ef2c4679ef9 322903 || goto error call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://web.archive.org/web/20200918004813id_/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe" "build\externals\htmlhelp.exe" d91371244ea98c691b4674ee266c4a2496a296800c176adae069d21f5c52c0763b21cc7859cfffa865b89e50171a2c99a6d14620c32f7d72c0ef04045348f856 3509072 || goto error |
From: <sv...@op...> - 2025-01-03 16:08:06
|
Author: manx Date: Fri Jan 3 17:07:54 2025 New Revision: 22747 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22747 Log: Merged revision(s) 22746 from branches/OpenMPT-1.31: [Var] Update XMPlay SDK to 2025-01-03. See r22745. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/build/download_externals.cmd Modified: branches/OpenMPT-1.30/build/download_externals.cmd ============================================================================== --- branches/OpenMPT-1.30/build/download_externals.cmd Fri Jan 3 17:07:00 2025 (r22746) +++ branches/OpenMPT-1.30/build/download_externals.cmd Fri Jan 3 17:07:54 2025 (r22747) @@ -38,7 +38,7 @@ call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://web.archive.org/web/20131217072017id_/http://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" "build\externals\WA5.55_SDK.exe" 394375db8a16bf155b5de9376f6290488ab339e503dbdfdc4e2f5bede967799e625c559cca363bc988324f1a8e86e5fd28a9f697422abd7bb3dcde4a766607b5 336166 || goto error -call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://www.un4seen.com/files/xmp-sdk.zip" "build\externals\xmp-sdk.zip" c0b872a5a9a9f6f42089550b356d783daaeb469b79d94bb6795bc7dcadac61c639bfb619e6c9e88f541df4573e5ef0099ca9cfb7204c5205f3fc6b4eb7e61450 322848 || goto error +call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://www.un4seen.com/files/xmp-sdk.zip" "build\externals\xmp-sdk.zip" 67b96c6e6aa794e9de4f446d23f969e3591457196fd100c5475f5df52308de861a0c411db54fcb2bf46a12e9136ddda9d2974a5167432a979a701ef2c4679ef9 322903 || goto error call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://web.archive.org/web/20200918004813id_/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe" "build\externals\htmlhelp.exe" d91371244ea98c691b4674ee266c4a2496a296800c176adae069d21f5c52c0763b21cc7859cfffa865b89e50171a2c99a6d14620c32f7d72c0ef04045348f856 3509072 || goto error |
From: <sv...@op...> - 2025-01-03 16:07:12
|
Author: manx Date: Fri Jan 3 17:07:00 2025 New Revision: 22746 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22746 Log: [Var] Update XMPlay SDK to 2025-01-03. See r22745. Modified: branches/OpenMPT-1.31/build/download_externals.cmd branches/OpenMPT-1.31/build/download_externals.sh Modified: branches/OpenMPT-1.31/build/download_externals.cmd ============================================================================== --- branches/OpenMPT-1.31/build/download_externals.cmd Fri Jan 3 17:05:55 2025 (r22745) +++ branches/OpenMPT-1.31/build/download_externals.cmd Fri Jan 3 17:07:00 2025 (r22746) @@ -38,7 +38,7 @@ call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://web.archive.org/web/20131217072017id_/http://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" "build\externals\WA5.55_SDK.exe" 394375db8a16bf155b5de9376f6290488ab339e503dbdfdc4e2f5bede967799e625c559cca363bc988324f1a8e86e5fd28a9f697422abd7bb3dcde4a766607b5 336166 || goto error -call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://www.un4seen.com/files/xmp-sdk.zip" "build\externals\xmp-sdk.zip" c0b872a5a9a9f6f42089550b356d783daaeb469b79d94bb6795bc7dcadac61c639bfb619e6c9e88f541df4573e5ef0099ca9cfb7204c5205f3fc6b4eb7e61450 322848 || goto error +call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://www.un4seen.com/files/xmp-sdk.zip" "build\externals\xmp-sdk.zip" 67b96c6e6aa794e9de4f446d23f969e3591457196fd100c5475f5df52308de861a0c411db54fcb2bf46a12e9136ddda9d2974a5167432a979a701ef2c4679ef9 322903 || goto error call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://web.archive.org/web/20200918004813id_/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe" "build\externals\htmlhelp.exe" d91371244ea98c691b4674ee266c4a2496a296800c176adae069d21f5c52c0763b21cc7859cfffa865b89e50171a2c99a6d14620c32f7d72c0ef04045348f856 3509072 || goto error Modified: branches/OpenMPT-1.31/build/download_externals.sh ============================================================================== --- branches/OpenMPT-1.31/build/download_externals.sh Fri Jan 3 17:05:55 2025 (r22745) +++ branches/OpenMPT-1.31/build/download_externals.sh Fri Jan 3 17:07:00 2025 (r22746) @@ -99,7 +99,7 @@ download "build/externals/csdpmi7b.zip" 71339 58c24691d27cead1cec92d334af551f37a3ba31de25a687d99399c28d822ec9f6ffccc9332bfce35e65dae4dd1210b54e54b223a4de17f5adcb11e2da004b834 "https://lib.openmpt.org/files/libopenmpt/contrib/djgpp/cwsdpmi/csdpmi7b.zip https://djgpp.mirror.garr.it/current/v2misc/csdpmi7b.zip" download "build/externals/csdpmi7s.zip" 89872 ea5652d31850d8eb0d15a919de0b51849f58efea0d16ad2aa4687fac4abd223d0ca34a2d1b616b02fafe84651dbef3e506df9262cfb399eb6d9909bffc89bfd3 "https://lib.openmpt.org/files/libopenmpt/contrib/djgpp/cwsdpmi/csdpmi7s.zip https://djgpp.mirror.garr.it/current/v2misc/csdpmi7s.zip" download "build/externals/WA5.55_SDK.exe" 336166 394375db8a16bf155b5de9376f6290488ab339e503dbdfdc4e2f5bede967799e625c559cca363bc988324f1a8e86e5fd28a9f697422abd7bb3dcde4a766607b5 "http://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe https://web.archive.org/web/20131217072017id_/http://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" -download "build/externals/xmp-sdk.zip" 322848 c0b872a5a9a9f6f42089550b356d783daaeb469b79d94bb6795bc7dcadac61c639bfb619e6c9e88f541df4573e5ef0099ca9cfb7204c5205f3fc6b4eb7e61450 "https://www.un4seen.com/files/xmp-sdk.zip" +download "build/externals/xmp-sdk.zip" 322903 67b96c6e6aa794e9de4f446d23f969e3591457196fd100c5475f5df52308de861a0c411db54fcb2bf46a12e9136ddda9d2974a5167432a979a701ef2c4679ef9 "https://www.un4seen.com/files/xmp-sdk.zip" unpack "include/allegro42" "build/externals/allegro-4.2.3.1-hg.8+r8500.zip" "." unpack "include/cwsdpmi" "build/externals/csdpmi7b.zip" "." |
From: <sv...@op...> - 2025-01-03 16:06:08
|
Author: manx Date: Fri Jan 3 17:05:55 2025 New Revision: 22745 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22745 Log: [Var] Update XMPlay SDK to 2025-01-03. Modified: trunk/OpenMPT/build/download_externals.txt Modified: trunk/OpenMPT/build/download_externals.txt ============================================================================== --- trunk/OpenMPT/build/download_externals.txt Fri Jan 3 17:00:01 2025 (r22744) +++ trunk/OpenMPT/build/download_externals.txt Fri Jan 3 17:05:55 2025 (r22745) @@ -2,7 +2,7 @@ "build/externals/7z2409-extra.7z" 1624377 d17ef51ebe5e61761fa449c0d6106950e7e8dd9ef9bb9f129aed048f3d8d81662ba82a71e8264fff7c0f6764f410f2e8a4430d27e4ce915cf339e8d639905b3b "https://7-zip.org/a/7z2409-extra.7z" "https://netcologne.dl.sourceforge.net/project/sevenzip/7-Zip/24.09/7z2409-extra.7z" "build/externals/7z2409-x64.exe" 1637343 2e8b746c51132f933cc526db661c2cb8cee889f390e3ce19dabbad1a2e6e13bed7a60f08809282df8d43c1c528a8ce7ce28e9e39fea8c16fd3fcda5604ae0c85 "https://7-zip.org/a/7z2409-x64.exe" "https://netcologne.dl.sourceforge.net/project/sevenzip/7-Zip/24.09/7z2409-x64.exe" "build/externals/WA5.55_SDK.exe" 336166 394375db8a16bf155b5de9376f6290488ab339e503dbdfdc4e2f5bede967799e625c559cca363bc988324f1a8e86e5fd28a9f697422abd7bb3dcde4a766607b5 "https://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" "http://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" "https://web.archive.org/web/20131217072017id_/http://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" -"build/externals/xmp-sdk.zip" 322848 c0b872a5a9a9f6f42089550b356d783daaeb469b79d94bb6795bc7dcadac61c639bfb619e6c9e88f541df4573e5ef0099ca9cfb7204c5205f3fc6b4eb7e61450 "https://www.un4seen.com/files/xmp-sdk.zip" +"build/externals/xmp-sdk.zip" 322903 67b96c6e6aa794e9de4f446d23f969e3591457196fd100c5475f5df52308de861a0c411db54fcb2bf46a12e9136ddda9d2974a5167432a979a701ef2c4679ef9 "https://www.un4seen.com/files/xmp-sdk.zip" "build/externals/htmlhelp.exe" 3509072 d91371244ea98c691b4674ee266c4a2496a296800c176adae069d21f5c52c0763b21cc7859cfffa865b89e50171a2c99a6d14620c32f7d72c0ef04045348f856 "https://web.archive.org/web/20200918004813id_/https://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe" "https://web.archive.org/web/20200918004813id_/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe" "build/externals/python-3.13.1-embed-amd64.zip" 10847803 a78713e292c9ee920bb8f44f33176e54d8807c70c343528cba2e11f22fba43082293df81d31aa0e6ed7e9a206568e28884e45ed68beaf36a0746d2bee0be6d90 "https://www.python.org/ftp/python/3.13.1/python-3.13.1-embed-amd64.zip" "build/externals/innounp050.rar" 141621 dbbc809308267a866db9d6b751fdeda6d179e1a65d8ddb14bb51984431ae91493f9a76105e1789b245732043a2c696c869ed10964b48cf59f81e55bd52f85330 "https://netcologne.dl.sourceforge.net/project/innounp/innounp/innounp 0.50/innounp050.rar" "https://deac-fra.dl.sourceforge.net/project/innounp/innounp/innounp 0.50/innounp050.rar" |
From: <sv...@op...> - 2025-01-03 16:00:22
|
Author: manx Date: Fri Jan 3 17:00:01 2025 New Revision: 22744 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22744 Log: [Ref] mpt/base/detect_quirks.hpp: Add MPT_LIBCXX_QUIRK_BROKEN_USER_LOCALE and MPT_LIBCXX_QUIRK_BROKEN_ACTIVE_LOCALE for Cygwin. See <https://cygwin.com/cgit/cygwin-packages/libopenmpt/tree/libopenmpt-0.7.12-1.src.patch?id=c4baa491e8a0975a1c7e0dfdf5ddf208d5b4ba6b>. Modified: trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Modified: trunk/OpenMPT/src/mpt/base/detect_quirks.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Fri Jan 3 16:57:34 2025 (r22743) +++ trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Fri Jan 3 17:00:01 2025 (r22744) @@ -257,6 +257,16 @@ +#if MPT_OS_CYGWIN +#define MPT_LIBCXX_QUIRK_BROKEN_USER_LOCALE +#endif + + + +// #define MPT_LIBCXX_QUIRK_BROKEN_ACTIVE_LOCALE + + + #if MPT_CXX_AT_LEAST(20) #if MPT_LIBCXX_GNU_BEFORE(10) || MPT_LIBCXX_LLVM_BEFORE(13000) || (MPT_LIBCXX_MS && MPT_MSVC_BEFORE(2022, 0)) || (MPT_LIBCXX_MS && !MPT_COMPILER_MSVC) #define MPT_LIBCXX_QUIRK_NO_CXX20_CONSTEXPR_ALGORITHM |
From: <sv...@op...> - 2025-01-03 15:58:20
|
Author: manx Date: Fri Jan 3 16:57:34 2025 New Revision: 22743 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22743 Log: [Ref] mpt/base/detect_os.hpp: Add MPT_OS_CYGWIN detection. Modified: trunk/OpenMPT/src/mpt/base/detect_os.hpp Modified: trunk/OpenMPT/src/mpt/base/detect_os.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/base/detect_os.hpp Fri Jan 3 16:56:56 2025 (r22742) +++ trunk/OpenMPT/src/mpt/base/detect_os.hpp Fri Jan 3 16:57:34 2025 (r22743) @@ -93,6 +93,10 @@ #endif +#elif defined(__CYGWIN__) +#define MPT_OS_CYGWIN 1 + + #elif defined(_WIN32) #define MPT_OS_WINDOWS 1 #if !defined(_WIN32_WINDOWS) && !defined(WINVER) @@ -379,6 +383,9 @@ #ifndef MPT_OS_EMSCRIPTEN #define MPT_OS_EMSCRIPTEN 0 #endif +#ifndef MPT_OS_CYGWIN +#define MPT_OS_CYGWIN 0 +#endif #ifndef MPT_OS_WINDOWS #define MPT_OS_WINDOWS 0 #endif |
From: <sv...@op...> - 2025-01-03 15:57:08
|
Author: manx Date: Fri Jan 3 16:56:56 2025 New Revision: 22742 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22742 Log: [Imp] mpt/string_transcode/tests/tests_string_transcode.hpp: Add tests for active_locale being sane. Modified: trunk/OpenMPT/src/mpt/string_transcode/tests/tests_string_transcode.hpp Modified: trunk/OpenMPT/src/mpt/string_transcode/tests/tests_string_transcode.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/string_transcode/tests/tests_string_transcode.hpp Fri Jan 3 16:56:05 2025 (r22741) +++ trunk/OpenMPT/src/mpt/string_transcode/tests/tests_string_transcode.hpp Fri Jan 3 16:56:56 2025 (r22742) @@ -47,6 +47,8 @@ MPT_TEST_EXPECT_EQUAL(mpt::transcode<std::string>(mpt::logical_encoding::locale, MPT_USTRING("a")), "a"); MPT_TEST_EXPECT_EQUAL(mpt::transcode<mpt::ustring>(mpt::logical_encoding::locale, "a"), MPT_USTRING("a")); + MPT_TEST_EXPECT_EQUAL(mpt::transcode<std::string>(mpt::logical_encoding::active_locale, MPT_USTRING("a")), "a"); + MPT_TEST_EXPECT_EQUAL(mpt::transcode<mpt::ustring>(mpt::logical_encoding::active_locale, "a"), MPT_USTRING("a")); MPT_TEST_EXPECT_EQUAL(mpt::transcode<std::string>(mpt::common_encoding::utf8, MPT_UTF8_STRING("a")), "a"); MPT_TEST_EXPECT_EQUAL(mpt::transcode<std::string>(mpt::common_encoding::iso8859_1, MPT_UTF8_STRING("a")), "a"); @@ -57,6 +59,8 @@ MPT_TEST_EXPECT_EQUAL(mpt::transcode<std::string>(mpt::logical_encoding::locale, MPT_UTF8_STRING("a")), "a"); MPT_TEST_EXPECT_EQUAL(mpt::transcode<mpt::ustring>(mpt::logical_encoding::locale, "a"), MPT_UTF8_STRING("a")); + MPT_TEST_EXPECT_EQUAL(mpt::transcode<std::string>(mpt::logical_encoding::active_locale, MPT_UTF8_STRING("a")), "a"); + MPT_TEST_EXPECT_EQUAL(mpt::transcode<mpt::ustring>(mpt::logical_encoding::active_locale, "a"), MPT_UTF8_STRING("a")); #if MPT_OS_EMSCRIPTEN MPT_TEST_EXPECT_EQUAL(mpt::transcode<std::string>(mpt::logical_encoding::locale, MPT_UTF8_STRING("\xe2\x8c\x82")), "\xe2\x8c\x82"); @@ -76,6 +80,8 @@ MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::string>(mpt::logical_encoding::locale, MPT_UTF8_STRING("abc\xC3\xA4xyz")), "xyz")); MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<std::string>(mpt::logical_encoding::locale, MPT_UTF8_STRING("abc\xC3\xA4xyz")), "abc")); + MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::string>(mpt::logical_encoding::active_locale, MPT_UTF8_STRING("abc\xC3\xA4xyz")), "xyz")); + MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<std::string>(mpt::logical_encoding::active_locale, MPT_UTF8_STRING("abc\xC3\xA4xyz")), "abc")); MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::string>(mpt::common_encoding::ascii, MPT_UTF8_STRING("abc\xE5\xAE\xB6xyz")), "xyz")); MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::string>(mpt::common_encoding::iso8859_1, MPT_UTF8_STRING("abc\xE5\xAE\xB6xyz")), "xyz")); @@ -88,6 +94,8 @@ MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::string>(mpt::logical_encoding::locale, MPT_UTF8_STRING("abc\xE5\xAE\xB6xyz")), "xyz")); MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<std::string>(mpt::logical_encoding::locale, MPT_UTF8_STRING("abc\xE5\xAE\xB6xyz")), "abc")); + MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::string>(mpt::logical_encoding::active_locale, MPT_UTF8_STRING("abc\xE5\xAE\xB6xyz")), "xyz")); + MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<std::string>(mpt::logical_encoding::active_locale, MPT_UTF8_STRING("abc\xE5\xAE\xB6xyz")), "abc")); MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<mpt::ustring>(mpt::common_encoding::ascii, "abc\xC3\xA4xyz"), MPT_USTRING("xyz"))); MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<mpt::ustring>(mpt::common_encoding::iso8859_1, "abc\xC3\xA4xyz"), MPT_USTRING("xyz"))); @@ -100,6 +108,8 @@ MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<mpt::ustring>(mpt::logical_encoding::locale, "abc\xC3\xA4xyz"), MPT_USTRING("xyz"))); MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<mpt::ustring>(mpt::logical_encoding::locale, "abc\xC3\xA4xyz"), MPT_USTRING("abc"))); + MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<mpt::ustring>(mpt::logical_encoding::active_locale, "abc\xC3\xA4xyz"), MPT_USTRING("xyz"))); + MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<mpt::ustring>(mpt::logical_encoding::active_locale, "abc\xC3\xA4xyz"), MPT_USTRING("abc"))); MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<mpt::ustring>(mpt::common_encoding::ascii, "abc\xE5\xAE\xB6xyz"), MPT_USTRING("xyz"))); MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<mpt::ustring>(mpt::common_encoding::iso8859_1, "abc\xE5\xAE\xB6xyz"), MPT_USTRING("xyz"))); @@ -112,6 +122,8 @@ MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<mpt::ustring>(mpt::logical_encoding::locale, "abc\xE5\xAE\xB6xyz"), MPT_USTRING("xyz"))); MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<mpt::ustring>(mpt::logical_encoding::locale, "abc\xE5\xAE\xB6xyz"), MPT_USTRING("abc"))); + MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<mpt::ustring>(mpt::logical_encoding::active_locale, "abc\xE5\xAE\xB6xyz"), MPT_USTRING("xyz"))); + MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<mpt::ustring>(mpt::logical_encoding::active_locale, "abc\xE5\xAE\xB6xyz"), MPT_USTRING("abc"))); // Check that characters are correctly converted // We test german umlaut-a (U+00E4) and CJK U+5BB6 @@ -156,6 +168,8 @@ MPT_TEST_EXPECT_EQUAL(mpt::transcode<std::string>(mpt::logical_encoding::locale, L"a"), "a"); MPT_TEST_EXPECT_EQUAL(mpt::transcode<std::wstring>(mpt::logical_encoding::locale, "a"), L"a"); + MPT_TEST_EXPECT_EQUAL(mpt::transcode<std::string>(mpt::logical_encoding::active_locale, L"a"), "a"); + MPT_TEST_EXPECT_EQUAL(mpt::transcode<std::wstring>(mpt::logical_encoding::active_locale, "a"), L"a"); // Check that some character replacement is done (and not just empty strings or truncated strings are returned) // We test german umlaut-a (U+00E4) and CJK U+5BB6 @@ -176,6 +190,8 @@ MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::string>(mpt::logical_encoding::locale, L"abc\u00E4xyz"), "xyz")); MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<std::string>(mpt::logical_encoding::locale, L"abc\u00E4xyz"), "abc")); + MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::string>(mpt::logical_encoding::active_locale, L"abc\u00E4xyz"), "xyz")); + MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<std::string>(mpt::logical_encoding::active_locale, L"abc\u00E4xyz"), "abc")); MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::string>(mpt::common_encoding::ascii, L"abc\u5BB6xyz"), "xyz")); MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::string>(mpt::common_encoding::iso8859_1, L"abc\u5BB6xyz"), "xyz")); @@ -188,6 +204,8 @@ MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::string>(mpt::logical_encoding::locale, L"abc\u5BB6xyz"), "xyz")); MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<std::string>(mpt::logical_encoding::locale, L"abc\u5BB6xyz"), "abc")); + MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::string>(mpt::logical_encoding::active_locale, L"abc\u5BB6xyz"), "xyz")); + MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<std::string>(mpt::logical_encoding::active_locale, L"abc\u5BB6xyz"), "abc")); MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::wstring>(mpt::common_encoding::ascii, "abc\xC3\xA4xyz"), L"xyz")); MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::wstring>(mpt::common_encoding::iso8859_1, "abc\xC3\xA4xyz"), L"xyz")); @@ -200,6 +218,8 @@ MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::wstring>(mpt::logical_encoding::locale, "abc\xC3\xA4xyz"), L"xyz")); MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<std::wstring>(mpt::logical_encoding::locale, "abc\xC3\xA4xyz"), L"abc")); + MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::wstring>(mpt::logical_encoding::active_locale, "abc\xC3\xA4xyz"), L"xyz")); + MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<std::wstring>(mpt::logical_encoding::active_locale, "abc\xC3\xA4xyz"), L"abc")); MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::wstring>(mpt::common_encoding::ascii, "abc\xE5\xAE\xB6xyz"), L"xyz")); MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::wstring>(mpt::common_encoding::iso8859_1, "abc\xE5\xAE\xB6xyz"), L"xyz")); @@ -212,6 +232,8 @@ MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::wstring>(mpt::logical_encoding::locale, "abc\xE5\xAE\xB6xyz"), L"xyz")); MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<std::wstring>(mpt::logical_encoding::locale, "abc\xE5\xAE\xB6xyz"), L"abc")); + MPT_TEST_EXPECT_EXPR(mpt::ends_with(mpt::transcode<std::wstring>(mpt::logical_encoding::active_locale, "abc\xE5\xAE\xB6xyz"), L"xyz")); + MPT_TEST_EXPECT_EXPR(mpt::starts_with(mpt::transcode<std::wstring>(mpt::logical_encoding::active_locale, "abc\xE5\xAE\xB6xyz"), L"abc")); // Check that characters are correctly converted // We test german umlaut-a (U+00E4) and CJK U+5BB6 |
From: <sv...@op...> - 2025-01-03 15:56:17
|
Author: sagamusix Date: Fri Jan 3 16:56:05 2025 New Revision: 22741 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22741 Log: [Ref] DrawButtonRect: Take rect by reference rather than pointer. Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/Draw_pat.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/Mptrack.h trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp Fri Jan 3 16:40:39 2025 (r22740) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp Fri Jan 3 16:56:05 2025 (r22741) @@ -216,7 +216,7 @@ s.clear(); } rect.SetRect(0, ypaint, m_cxFont, ypaint+m_cyFont); - DrawButtonRect(dc, lineWidth, &rect, s.c_str(), false, false); + DrawButtonRect(dc, lineWidth, rect, s.c_str(), false, false); // Mapped Note bool highlight = ((focus) && (nPos == (int)m_nNote)); rect.left = rect.right; @@ -263,7 +263,7 @@ dc.DrawText(s.c_str(), -1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER | DT_NOPREFIX); } rect.SetRect(rcClient.left + m_cxFont * 2 - 1, rcClient.top, rcClient.left + m_cxFont * 2 + 3, ypaint); - DrawButtonRect(dc, lineWidth, &rect, _T(""), false, false); + DrawButtonRect(dc, lineWidth, rect, _T(""), false, false); if (ypaint < rcClient.bottom) { rect.SetRect(rcClient.left, ypaint, rcClient.right, rcClient.bottom); Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Draw_pat.cpp Fri Jan 3 16:40:39 2025 (r22740) +++ trunk/OpenMPT/mptrack/Draw_pat.cpp Fri Jan 3 16:56:05 2025 (r22741) @@ -681,7 +681,7 @@ int width = HighDPISupport::ScalePixels(1, m_hWnd); rc.SetRect(0, ypaint, rcClient.right + 1, rcClient.bottom + 1); if(width == 1) - DrawButtonRect(hdc, lineWidth, &rc, _T("")); + DrawButtonRect(hdc, lineWidth, rc, _T("")); else DrawEdge(hdc, rc, EDGE_RAISED, BF_TOPLEFT | BF_MIDDLE); // Prevent lower edge from being drawn } @@ -700,7 +700,7 @@ { sprintf(s, "#%u", m_nPattern); rect.right = m_szHeader.cx; - DrawButtonRect(hdc, lineWidth, &rect, s, false, + DrawButtonRect(hdc, lineWidth, rect, s, false, m_bInItemRect && m_nDragItem.Type() == DragItem::PatternHeader); const int dropWidth = HighDPISupport::ScalePixels(2, m_hWnd); @@ -723,7 +723,7 @@ else if(numVisibleColums < 5) pszfmt = sndFile.m_bChannelMuteTogglePending[ncolhdr] ? "[Chn %u]" : "Chn %u"; sprintf(s, pszfmt, ncolhdr + 1, channel.szName.buf); - DrawButtonRect(hdc, lineWidth, &rect, s, + DrawButtonRect(hdc, lineWidth, rect, s, channel.dwFlags[CHN_MUTE], m_bInItemRect && m_nDragItem.Type() == DragItem::ChannelHeader && m_nDragItem.Value() == ncolhdr, recordGroup != RecordGroup::NoGroup ? DT_RIGHT : DT_CENTER, chanColorHeight); @@ -769,7 +769,7 @@ InvertRect(hdc, &rect); s[0] = (recordGroup == RecordGroup::Group1) ? '1' : '2'; s[1] = '\0'; - DrawButtonRect(hdc, lineWidth, &insRect, s, false, false, DT_CENTER); + DrawButtonRect(hdc, lineWidth, insRect, s, false, false, DT_CENTER); FrameRect(hdc, &insRect, blackBrush); } @@ -788,7 +788,7 @@ sprintf(s, "%u: %s", mixPlug, (sndFile.m_MixPlugins[mixPlug - 1]).pMixPlugin ? sndFile.m_MixPlugins[mixPlug - 1].GetNameLocale() : "[empty]"); else sprintf(s, "---"); - DrawButtonRect(hdc, lineWidth, &rect, s, channel.dwFlags[CHN_NOFX], + DrawButtonRect(hdc, lineWidth, rect, s, channel.dwFlags[CHN_NOFX], m_bInItemRect && (m_nDragItem.Type() == DragItem::PluginName) && (m_nDragItem.Value() == ncolhdr), DT_CENTER); } @@ -921,7 +921,7 @@ else wsprintf(s, _T("%d"), compRow); - DrawButtonRect(hdc, lineWidth, &rect, s, !selEnable || rowDisabled); + DrawButtonRect(hdc, lineWidth, rect, s, !selEnable || rowDisabled); oldrowcolor = EncodeRowColor(row_bkcol, row_col, bRowSel); bRowSel = (m_Selection.ContainsVertical(PatternCursor(row))); row_col = MODCOLOR_TEXTNORMAL; Modified: trunk/OpenMPT/mptrack/Mptrack.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp Fri Jan 3 16:40:39 2025 (r22740) +++ trunk/OpenMPT/mptrack/Mptrack.cpp Fri Jan 3 16:56:05 2025 (r22741) @@ -2040,27 +2040,27 @@ } -void DrawButtonRect(HDC hdc, int lineWidth, const RECT *lpRect, const char *text, bool disabled, bool pushed, DWORD dwFlags, uint32 topMargin) +void DrawButtonRect(HDC hdc, int lineWidth, const CRect &rect, const char *text, bool disabled, bool pushed, DWORD dwFlags, uint32 topMargin) { - DrawButtonRectImpl(hdc, lineWidth, CMainFrame::GetGUIFont(), *lpRect, text, disabled, pushed, dwFlags, topMargin); + DrawButtonRectImpl(hdc, lineWidth, CMainFrame::GetGUIFont(), rect, text, disabled, pushed, dwFlags, topMargin); } -void DrawButtonRect(HDC hdc, int lineWidth, const RECT *lpRect, const wchar_t * text, bool disabled, bool pushed, DWORD dwFlags, uint32 topMargin) +void DrawButtonRect(HDC hdc, int lineWidth, const CRect &rect, const wchar_t *text, bool disabled, bool pushed, DWORD dwFlags, uint32 topMargin) { - DrawButtonRectImpl(hdc, lineWidth, CMainFrame::GetGUIFont(), *lpRect, text, disabled, pushed, dwFlags, topMargin); + DrawButtonRectImpl(hdc, lineWidth, CMainFrame::GetGUIFont(), rect, text, disabled, pushed, dwFlags, topMargin); } -void DrawButtonRect(HDC hdc, int lineWidth, HFONT font, const RECT *lpRect, const char * text, bool disabled, bool pushed, DWORD dwFlags, uint32 topMargin) +void DrawButtonRect(HDC hdc, int lineWidth, HFONT font, const CRect &rect, const char *text, bool disabled, bool pushed, DWORD dwFlags, uint32 topMargin) { - DrawButtonRectImpl(hdc, lineWidth, font, *lpRect, text, disabled, pushed, dwFlags, topMargin); + DrawButtonRectImpl(hdc, lineWidth, font, rect, text, disabled, pushed, dwFlags, topMargin); } -void DrawButtonRect(HDC hdc, int lineWidth, HFONT font, const RECT *lpRect, const wchar_t * text, bool disabled, bool pushed, DWORD dwFlags, uint32 topMargin) +void DrawButtonRect(HDC hdc, int lineWidth, HFONT font, const CRect &rect, const wchar_t *text, bool disabled, bool pushed, DWORD dwFlags, uint32 topMargin) { - DrawButtonRectImpl(hdc, lineWidth, font, *lpRect, text, disabled, pushed, dwFlags, topMargin); + DrawButtonRectImpl(hdc, lineWidth, font, rect, text, disabled, pushed, dwFlags, topMargin); } Modified: trunk/OpenMPT/mptrack/Mptrack.h ============================================================================== --- trunk/OpenMPT/mptrack/Mptrack.h Fri Jan 3 16:40:39 2025 (r22740) +++ trunk/OpenMPT/mptrack/Mptrack.h Fri Jan 3 16:56:05 2025 (r22741) @@ -419,10 +419,10 @@ // Other bitmap functions int DrawTextT(HDC hdc, const wchar_t *lpchText, int cchText, LPRECT lprc, UINT format); int DrawTextT(HDC hdc, const char *lpchText, int cchText, LPRECT lprc, UINT format); -void DrawButtonRect(HDC hdc, int lineWidth, const RECT *lpRect, const char *text = nullptr, bool disabled = false, bool pushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); -void DrawButtonRect(HDC hdc, int lineWidth, const RECT *lpRect, const wchar_t *text = nullptr, bool disabled = false, bool pushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); -void DrawButtonRect(HDC hdc, int lineWidth, HFONT font, const RECT *lpRect, const char *text = nullptr, bool disabled = false, bool pushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); -void DrawButtonRect(HDC hdc, int lineWidth, HFONT font, const RECT *lpRect, const wchar_t *text = nullptr, bool disabled = false, bool pushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); +void DrawButtonRect(HDC hdc, int lineWidth, const CRect &rect, const char *text = nullptr, bool disabled = false, bool pushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); +void DrawButtonRect(HDC hdc, int lineWidth, const CRect &rect, const wchar_t *text = nullptr, bool disabled = false, bool pushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); +void DrawButtonRect(HDC hdc, int lineWidth, HFONT font, const CRect &rect, const char *text = nullptr, bool disabled = false, bool pushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); +void DrawButtonRect(HDC hdc, int lineWidth, HFONT font, const CRect &rect, const wchar_t *text = nullptr, bool disabled = false, bool pushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); // Misc functions void ErrorBox(UINT nStringID, CWnd *p = nullptr); Modified: trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp ============================================================================== --- trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp Fri Jan 3 16:40:39 2025 (r22740) +++ trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp Fri Jan 3 16:56:05 2025 (r22741) @@ -89,7 +89,7 @@ rect.SetRect(0, ypaint, m_cxFont, ypaint + m_cyFont); const auto noteStr = isValidNote ? mpt::tfmt::val(noteToDraw) : mpt::tstring(_T("...")); - DrawButtonRect(dc, lineWidth, m_font, &rect, noteStr.c_str(), false, false); + DrawButtonRect(dc, lineWidth, m_font, rect, noteStr.c_str(), false, false); // Mapped Note const bool highLight = focus && (nPos == (int)m_nNote); @@ -115,7 +115,7 @@ } rect.SetRect(rcClient.left + m_cxFont * 4 - 1, rcClient.top, rcClient.left + m_cxFont * 4 + 3, ypaint); - DrawButtonRect(dc, lineWidth, m_font, &rect, _T("")); + DrawButtonRect(dc, lineWidth, m_font, rect, _T("")); if (ypaint < rcClient.bottom) { rect.SetRect(rcClient.left, ypaint, rcClient.right, rcClient.bottom); |
From: <sv...@op...> - 2025-01-03 15:41:03
|
Author: sagamusix Date: Fri Jan 3 16:40:39 2025 New Revision: 22740 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22740 Log: [Fix] Pattern tab: With smooth scrolling enabling, buttons were always drawn natively, even at 96 DPI, because we cannot obtain a window handle from an offscreen DC. Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/Draw_pat.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/Mptrack.h trunk/OpenMPT/mptrack/View_pat.h trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp Fri Jan 3 11:47:43 2025 (r22739) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp Fri Jan 3 16:40:39 2025 (r22740) @@ -173,6 +173,7 @@ const auto highlightBrush = GetSysColorBrush(COLOR_HIGHLIGHT), windowBrush = GetSysColorBrush(COLOR_WINDOW); const auto colorText = GetSysColor(COLOR_WINDOWTEXT); const auto colorTextSel = GetSysColor(COLOR_HIGHLIGHTTEXT); + const int lineWidth = HighDPISupport::ScalePixels(1, *this); auto oldFont = dc.SelectObject(CMainFrame::GetGUIFont()); dc.SetBkMode(TRANSPARENT); if ((m_cxFont <= 0) || (m_cyFont <= 0)) @@ -215,7 +216,7 @@ s.clear(); } rect.SetRect(0, ypaint, m_cxFont, ypaint+m_cyFont); - DrawButtonRect(dc, &rect, s.c_str(), FALSE, FALSE); + DrawButtonRect(dc, lineWidth, &rect, s.c_str(), false, false); // Mapped Note bool highlight = ((focus) && (nPos == (int)m_nNote)); rect.left = rect.right; @@ -262,7 +263,7 @@ dc.DrawText(s.c_str(), -1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER | DT_NOPREFIX); } rect.SetRect(rcClient.left + m_cxFont * 2 - 1, rcClient.top, rcClient.left + m_cxFont * 2 + 3, ypaint); - DrawButtonRect(dc, &rect, _T(""), FALSE, FALSE); + DrawButtonRect(dc, lineWidth, &rect, _T(""), false, false); if (ypaint < rcClient.bottom) { rect.SetRect(rcClient.left, ypaint, rcClient.right, rcClient.bottom); Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Draw_pat.cpp Fri Jan 3 11:47:43 2025 (r22739) +++ trunk/OpenMPT/mptrack/Draw_pat.cpp Fri Jan 3 16:40:39 2025 (r22740) @@ -538,18 +538,20 @@ if ((pModDoc = GetDocument()) == nullptr) return; m_chnState.resize(pModDoc->GetNumChannels()); - + + FlagSet<PatternSetup> patternSetup = TrackerSettings::Instance().patternSetup; const int vuHeight = MulDiv(VUMETERS_HEIGHT, m_dpi, 96); const int colHeight = MulDiv(COLHDR_HEIGHT, m_dpi, 96); const int chanColorHeight = MulDiv(4, m_dpi, 96); const int chanColorOffset = MulDiv(2, m_dpi, 96); const int recordInsX = MulDiv(3, m_dpi, 96); - const bool doSmoothScroll = (TrackerSettings::Instance().patternSetup & PatternSetup::SmoothScrolling); + const bool doSmoothScroll = patternSetup[PatternSetup::SmoothScrolling]; + const int lineWidth = HighDPISupport::ScalePixels(1, *this); GetClientRect(&rcClient); HDC hdc; - HBITMAP oldBitmap = NULL; + HBITMAP oldBitmap = nullptr; if(doSmoothScroll) { if(rcClient != m_oldClient) @@ -593,7 +595,7 @@ PATTERNINDEX nPrevPat = PATTERNINDEX_INVALID; // Display previous pattern - if(TrackerSettings::Instance().patternSetup & PatternSetup::ShowPrevNextPattern) + if(patternSetup[PatternSetup::ShowPrevNextPattern]) { if(m_nOrder > 0 && m_nOrder < ordCount) { @@ -614,7 +616,7 @@ ypaint += (nSkip - n) * m_szCell.cy; rect.SetRect(0, m_szHeader.cy, nColumnWidth * ncols + m_szHeader.cx, ypaint - 1); m_Dib.SetBlendMode(true); - DrawPatternData(hdc, nPrevPat, false, false, + DrawPatternData(hdc, lineWidth, nPrevPat, false, false, nPrevRows - n, nPrevRows, xofs, rcClient, &ypaint); m_Dib.SetBlendMode(false); } else @@ -637,10 +639,10 @@ UINT nrows = sndFile.Patterns.IsValidPat(m_nPattern) ? sndFile.Patterns[m_nPattern].GetNumRows() : 0; int ypatternend = ypaint + (nrows-yofs)*m_szCell.cy; - DrawPatternData(hdc, m_nPattern, true, (pMainFrm->GetModPlaying() == pModDoc), + DrawPatternData(hdc, lineWidth, m_nPattern, true, (pMainFrm->GetModPlaying() == pModDoc), yofs, nrows, xofs, rcClient, &ypaint); // Display next pattern - if((TrackerSettings::Instance().patternSetup & PatternSetup::ShowPrevNextPattern) && (ypaint < rcClient.bottom) && (ypaint == ypatternend)) + if(patternSetup[PatternSetup::ShowPrevNextPattern] && (ypaint < rcClient.bottom) && (ypaint == ypatternend)) { int nVisRows = (rcClient.bottom - ypaint + m_szCell.cy - 1) / m_szCell.cy; if(nVisRows > 0) @@ -660,7 +662,7 @@ ROWINDEX n = std::min(static_cast<ROWINDEX>(nVisRows), nNextRows); m_Dib.SetBlendMode(true); - DrawPatternData(hdc, nNextPat, false, false, + DrawPatternData(hdc, lineWidth, nNextPat, false, false, 0, n, xofs, rcClient, &ypaint); m_Dib.SetBlendMode(false); } @@ -679,7 +681,7 @@ int width = HighDPISupport::ScalePixels(1, m_hWnd); rc.SetRect(0, ypaint, rcClient.right + 1, rcClient.bottom + 1); if(width == 1) - DrawButtonRect(hdc, &rc, _T("")); + DrawButtonRect(hdc, lineWidth, &rc, _T("")); else DrawEdge(hdc, rc, EDGE_RAISED, BF_TOPLEFT | BF_MIDDLE); // Prevent lower edge from being drawn } @@ -698,8 +700,8 @@ { sprintf(s, "#%u", m_nPattern); rect.right = m_szHeader.cx; - DrawButtonRect(hdc, &rect, s, FALSE, - (m_bInItemRect && m_nDragItem.Type() == DragItem::PatternHeader) ? TRUE : FALSE); + DrawButtonRect(hdc, lineWidth, &rect, s, false, + m_bInItemRect && m_nDragItem.Type() == DragItem::PatternHeader); const int dropWidth = HighDPISupport::ScalePixels(2, m_hWnd); @@ -721,9 +723,9 @@ else if(numVisibleColums < 5) pszfmt = sndFile.m_bChannelMuteTogglePending[ncolhdr] ? "[Chn %u]" : "Chn %u"; sprintf(s, pszfmt, ncolhdr + 1, channel.szName.buf); - DrawButtonRect(hdc, &rect, s, - channel.dwFlags[CHN_MUTE] ? TRUE : FALSE, - (m_bInItemRect && m_nDragItem.Type() == DragItem::ChannelHeader && m_nDragItem.Value() == ncolhdr) ? TRUE : FALSE, + DrawButtonRect(hdc, lineWidth, &rect, s, + channel.dwFlags[CHN_MUTE], + m_bInItemRect && m_nDragItem.Type() == DragItem::ChannelHeader && m_nDragItem.Value() == ncolhdr, recordGroup != RecordGroup::NoGroup ? DT_RIGHT : DT_CENTER, chanColorHeight); if(channel.color != ModChannelSettings::INVALID_COLOR) @@ -767,7 +769,7 @@ InvertRect(hdc, &rect); s[0] = (recordGroup == RecordGroup::Group1) ? '1' : '2'; s[1] = '\0'; - DrawButtonRect(hdc, &insRect, s, FALSE, FALSE, DT_CENTER); + DrawButtonRect(hdc, lineWidth, &insRect, s, false, false, DT_CENTER); FrameRect(hdc, &insRect, blackBrush); } @@ -786,8 +788,8 @@ sprintf(s, "%u: %s", mixPlug, (sndFile.m_MixPlugins[mixPlug - 1]).pMixPlugin ? sndFile.m_MixPlugins[mixPlug - 1].GetNameLocale() : "[empty]"); else sprintf(s, "---"); - DrawButtonRect(hdc, &rect, s, channel.dwFlags[CHN_NOFX] ? TRUE : FALSE, - ((m_bInItemRect) && (m_nDragItem.Type() == DragItem::PluginName) && (m_nDragItem.Value() == ncolhdr)) ? TRUE : FALSE, DT_CENTER); + DrawButtonRect(hdc, lineWidth, &rect, s, channel.dwFlags[CHN_NOFX], + m_bInItemRect && (m_nDragItem.Type() == DragItem::PluginName) && (m_nDragItem.Value() == ncolhdr), DT_CENTER); } } else break; @@ -819,7 +821,7 @@ } -void CViewPattern::DrawPatternData(HDC hdc, PATTERNINDEX nPattern, bool selEnable, +void CViewPattern::DrawPatternData(HDC hdc, const int lineWidth, PATTERNINDEX nPattern, bool selEnable, bool isPlaying, ROWINDEX startRow, ROWINDEX numRows, CHANNELINDEX startChan, CRect &rcClient, int *pypaint) { static_assert(1 << PatternCursor::lastColumn <= Util::MaxValueOfType(ChannelState{}.selectedCols), "Columns are used as bitmasks"); @@ -919,7 +921,7 @@ else wsprintf(s, _T("%d"), compRow); - DrawButtonRect(hdc, &rect, s, !selEnable || rowDisabled); + DrawButtonRect(hdc, lineWidth, &rect, s, !selEnable || rowDisabled); oldrowcolor = EncodeRowColor(row_bkcol, row_col, bRowSel); bRowSel = (m_Selection.ContainsVertical(PatternCursor(row))); row_col = MODCOLOR_TEXTNORMAL; Modified: trunk/OpenMPT/mptrack/Mptrack.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp Fri Jan 3 11:47:43 2025 (r22739) +++ trunk/OpenMPT/mptrack/Mptrack.cpp Fri Jan 3 16:40:39 2025 (r22740) @@ -2001,10 +2001,9 @@ } template<typename Tchar> -static void DrawButtonRectImpl(HDC hdc, HFONT font, CRect rect, const Tchar *lpszText, bool disabled, bool pushed, DWORD textFlags, uint32 topMargin) +static void DrawButtonRectImpl(HDC hdc, int lineWidth, HFONT font, CRect rect, const Tchar *text, bool disabled, bool pushed, DWORD textFlags, uint32 topMargin) { - int width = HighDPISupport::ScalePixels(1, WindowFromDC(hdc)); - if(width != 1) + if(lineWidth != 1) { // Draw "real" buttons in Hi-DPI mode DrawFrameControl(hdc, rect, DFC_BUTTON, pushed ? (DFCS_PUSHED | DFCS_BUTTONPUSH) : DFCS_BUTTONPUSH); @@ -2023,45 +2022,45 @@ SelectPen(hdc, oldpen); } - if(lpszText && lpszText[0]) + if(text && text[0]) { - rect.DeflateRect(width, width); + rect.DeflateRect(lineWidth, lineWidth); if(pushed) { - rect.top += width; - rect.left += width; + rect.top += lineWidth; + rect.left += lineWidth; } ::SetTextColor(hdc, GetSysColor(disabled ? COLOR_GRAYTEXT : COLOR_BTNTEXT)); ::SetBkMode(hdc, TRANSPARENT); rect.top += topMargin; auto oldFont = SelectFont(hdc, font); - DrawTextT(hdc, lpszText, -1, &rect, textFlags | DT_SINGLELINE | DT_NOPREFIX); + DrawTextT(hdc, text, -1, &rect, textFlags | DT_SINGLELINE | DT_NOPREFIX); SelectFont(hdc, oldFont); } } -void DrawButtonRect(HDC hdc, const RECT *lpRect, LPCSTR lpszText, BOOL bDisabled, BOOL bPushed, DWORD dwFlags, uint32 topMargin) +void DrawButtonRect(HDC hdc, int lineWidth, const RECT *lpRect, const char *text, bool disabled, bool pushed, DWORD dwFlags, uint32 topMargin) { - DrawButtonRectImpl(hdc, CMainFrame::GetGUIFont(), *lpRect, lpszText, bDisabled, bPushed, dwFlags, topMargin); + DrawButtonRectImpl(hdc, lineWidth, CMainFrame::GetGUIFont(), *lpRect, text, disabled, pushed, dwFlags, topMargin); } -void DrawButtonRect(HDC hdc, const RECT *lpRect, LPCWSTR lpszText, BOOL bDisabled, BOOL bPushed, DWORD dwFlags, uint32 topMargin) +void DrawButtonRect(HDC hdc, int lineWidth, const RECT *lpRect, const wchar_t * text, bool disabled, bool pushed, DWORD dwFlags, uint32 topMargin) { - DrawButtonRectImpl(hdc, CMainFrame::GetGUIFont(), *lpRect, lpszText, bDisabled, bPushed, dwFlags, topMargin); + DrawButtonRectImpl(hdc, lineWidth, CMainFrame::GetGUIFont(), *lpRect, text, disabled, pushed, dwFlags, topMargin); } -void DrawButtonRect(HDC hdc, HFONT font, const RECT *lpRect, LPCSTR lpszText, bool bDisabled, bool bPushed, DWORD dwFlags, uint32 topMargin) +void DrawButtonRect(HDC hdc, int lineWidth, HFONT font, const RECT *lpRect, const char * text, bool disabled, bool pushed, DWORD dwFlags, uint32 topMargin) { - DrawButtonRectImpl(hdc, font, *lpRect, lpszText, bDisabled, bPushed, dwFlags, topMargin); + DrawButtonRectImpl(hdc, lineWidth, font, *lpRect, text, disabled, pushed, dwFlags, topMargin); } -void DrawButtonRect(HDC hdc, HFONT font, const RECT *lpRect, LPCWSTR lpszText, bool bDisabled, bool bPushed, DWORD dwFlags, uint32 topMargin) +void DrawButtonRect(HDC hdc, int lineWidth, HFONT font, const RECT *lpRect, const wchar_t * text, bool disabled, bool pushed, DWORD dwFlags, uint32 topMargin) { - DrawButtonRectImpl(hdc, font, *lpRect, lpszText, bDisabled, bPushed, dwFlags, topMargin); + DrawButtonRectImpl(hdc, lineWidth, font, *lpRect, text, disabled, pushed, dwFlags, topMargin); } Modified: trunk/OpenMPT/mptrack/Mptrack.h ============================================================================== --- trunk/OpenMPT/mptrack/Mptrack.h Fri Jan 3 11:47:43 2025 (r22739) +++ trunk/OpenMPT/mptrack/Mptrack.h Fri Jan 3 16:40:39 2025 (r22740) @@ -419,10 +419,10 @@ // Other bitmap functions int DrawTextT(HDC hdc, const wchar_t *lpchText, int cchText, LPRECT lprc, UINT format); int DrawTextT(HDC hdc, const char *lpchText, int cchText, LPRECT lprc, UINT format); -void DrawButtonRect(HDC hdc, const RECT *lpRect, LPCSTR lpszText = nullptr, BOOL bDisabled = FALSE, BOOL bPushed = FALSE, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); -void DrawButtonRect(HDC hdc, const RECT *lpRect, LPCWSTR lpszText = nullptr, BOOL bDisabled = FALSE, BOOL bPushed = FALSE, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); -void DrawButtonRect(HDC hdc, HFONT font, const RECT *lpRect, LPCSTR lpszText = nullptr, bool bDisabled = false, bool bPushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); -void DrawButtonRect(HDC hdc, HFONT font, const RECT *lpRect, LPCWSTR lpszText = nullptr, bool bDisabled = false, bool bPushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); +void DrawButtonRect(HDC hdc, int lineWidth, const RECT *lpRect, const char *text = nullptr, bool disabled = false, bool pushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); +void DrawButtonRect(HDC hdc, int lineWidth, const RECT *lpRect, const wchar_t *text = nullptr, bool disabled = false, bool pushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); +void DrawButtonRect(HDC hdc, int lineWidth, HFONT font, const RECT *lpRect, const char *text = nullptr, bool disabled = false, bool pushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); +void DrawButtonRect(HDC hdc, int lineWidth, HFONT font, const RECT *lpRect, const wchar_t *text = nullptr, bool disabled = false, bool pushed = false, DWORD dwFlags = (DT_CENTER | DT_VCENTER), uint32 topMargin = 0); // Misc functions void ErrorBox(UINT nStringID, CWnd *p = nullptr); Modified: trunk/OpenMPT/mptrack/View_pat.h ============================================================================== --- trunk/OpenMPT/mptrack/View_pat.h Fri Jan 3 11:47:43 2025 (r22739) +++ trunk/OpenMPT/mptrack/View_pat.h Fri Jan 3 16:40:39 2025 (r22740) @@ -289,7 +289,7 @@ void OnDropSelection(); public: - void DrawPatternData(HDC hdc, PATTERNINDEX nPattern, bool selEnable, bool isPlaying, ROWINDEX startRow, ROWINDEX numRows, CHANNELINDEX startChan, CRect &rcClient, int *pypaint); + void DrawPatternData(HDC hdc, const int lineWidth, PATTERNINDEX nPattern, bool selEnable, bool isPlaying, ROWINDEX startRow, ROWINDEX numRows, CHANNELINDEX startChan, CRect &rcClient, int *pypaint); void DrawLetter(int x, int y, char letter, int sizex = 10, int ofsx = 0); void DrawLetter(int x, int y, wchar_t letter, int sizex = 10, int ofsx = 0); #if MPT_CXX_AT_LEAST(20) Modified: trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp ============================================================================== --- trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp Fri Jan 3 11:47:43 2025 (r22739) +++ trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp Fri Jan 3 16:40:39 2025 (r22740) @@ -48,6 +48,7 @@ const auto colorText = GetSysColor(COLOR_WINDOWTEXT); const auto colorTextSel = GetSysColor(COLOR_HIGHLIGHTTEXT); const auto highlightBrush = GetSysColorBrush(COLOR_HIGHLIGHT), windowBrush = GetSysColorBrush(COLOR_WINDOW); + const int lineWidth = HighDPISupport::ScalePixels(1, *this); if(int dpi = HighDPISupport::GetDpiForWindow(m_hWnd); m_dpi != dpi) { @@ -88,7 +89,7 @@ rect.SetRect(0, ypaint, m_cxFont, ypaint + m_cyFont); const auto noteStr = isValidNote ? mpt::tfmt::val(noteToDraw) : mpt::tstring(_T("...")); - DrawButtonRect(dc, m_font, &rect, noteStr.c_str(), false, false); + DrawButtonRect(dc, lineWidth, m_font, &rect, noteStr.c_str(), false, false); // Mapped Note const bool highLight = focus && (nPos == (int)m_nNote); @@ -114,7 +115,7 @@ } rect.SetRect(rcClient.left + m_cxFont * 4 - 1, rcClient.top, rcClient.left + m_cxFont * 4 + 3, ypaint); - DrawButtonRect(dc, m_font, &rect, _T("")); + DrawButtonRect(dc, lineWidth, m_font, &rect, _T("")); if (ypaint < rcClient.bottom) { rect.SetRect(rcClient.left, ypaint, rcClient.right, rcClient.bottom); |
From: <sv...@op...> - 2025-01-03 10:47:55
|
Author: sagamusix Date: Fri Jan 3 11:47:43 2025 New Revision: 22739 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22739 Log: Merged revision(s) 22738 from trunk/OpenMPT: [Fix] Pattern tab: Potential crash in continuous scroll mode if the current order cannot be retrieved (e.g. empty order list) (https://bugs.openmpt.org/view.php?id=1854). ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/mptrack/View_pat.cpp Modified: branches/OpenMPT-1.31/mptrack/View_pat.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/View_pat.cpp Fri Jan 3 11:46:34 2025 (r22738) +++ branches/OpenMPT-1.31/mptrack/View_pat.cpp Fri Jan 3 11:47:43 2025 (r22739) @@ -279,7 +279,7 @@ PATTERNINDEX curPattern = m_nPattern; ORDERINDEX curOrder = GetCurrentOrder(); // If current order and pattern are inconsistent, just jump to start of current pattern - if(curPattern != order[curOrder]) + if(curOrder >= order.size() || curPattern != order[curOrder]) return SetCurrentRow(0); do @@ -314,7 +314,7 @@ PATTERNINDEX curPattern = m_nPattern; ORDERINDEX curOrder = GetCurrentOrder(); // If current order and pattern are inconsistent, just jump to end of current pattern - if(curPattern != order[curOrder]) + if(curOrder >= order.size() || curPattern != order[curOrder]) return SetCurrentRow(numRows - 1); do |
From: <sv...@op...> - 2025-01-03 10:46:46
|
Author: sagamusix Date: Fri Jan 3 11:46:34 2025 New Revision: 22738 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22738 Log: [Fix] Pattern tab: Potential crash in continuous scroll mode if the current order cannot be retrieved (e.g. empty order list) (https://bugs.openmpt.org/view.php?id=1854). Modified: trunk/OpenMPT/mptrack/View_pat.cpp Modified: trunk/OpenMPT/mptrack/View_pat.cpp ============================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp Thu Jan 2 23:14:04 2025 (r22737) +++ trunk/OpenMPT/mptrack/View_pat.cpp Fri Jan 3 11:46:34 2025 (r22738) @@ -293,7 +293,7 @@ PATTERNINDEX curPattern = m_nPattern; ORDERINDEX curOrder = GetCurrentOrder(); // If current order and pattern are inconsistent, just jump to start of current pattern - if(curPattern != order[curOrder]) + if(curOrder >= order.size() || curPattern != order[curOrder]) return SetCurrentRow(0); do @@ -328,7 +328,7 @@ PATTERNINDEX curPattern = m_nPattern; ORDERINDEX curOrder = GetCurrentOrder(); // If current order and pattern are inconsistent, just jump to end of current pattern - if(curPattern != order[curOrder]) + if(curOrder >= order.size() || curPattern != order[curOrder]) return SetCurrentRow(numRows - 1); do |
From: <sv...@op...> - 2025-01-02 22:14:16
|
Author: manx Date: Thu Jan 2 23:14:04 2025 New Revision: 22737 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22737 Log: Merged revision(s) 22734 from trunk/OpenMPT: [Ref] xmp-openmpt: Silence unused function warning with UNICODE gcc. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/libopenmpt/xmp-openmpt/xmp-openmpt.cpp Modified: branches/OpenMPT-1.31/libopenmpt/xmp-openmpt/xmp-openmpt.cpp ============================================================================== --- branches/OpenMPT-1.31/libopenmpt/xmp-openmpt/xmp-openmpt.cpp Thu Jan 2 23:12:27 2025 (r22736) +++ branches/OpenMPT-1.31/libopenmpt/xmp-openmpt/xmp-openmpt.cpp Thu Jan 2 23:14:04 2025 (r22737) @@ -114,7 +114,9 @@ static std::string convert_to_native( const std::string & str ); +#if !defined(UNICODE) static std::string StringEncode( const std::wstring &src, UINT codepage ); +#endif static std::wstring StringDecode( const std::string & src, UINT codepage ); @@ -194,6 +196,7 @@ return result; } +#if !defined(UNICODE) static std::string StringEncode( const std::wstring &src, UINT codepage ) { int required_size = WideCharToMultiByte( codepage, 0, src.c_str(), -1, nullptr, 0, nullptr, nullptr); @@ -205,6 +208,7 @@ WideCharToMultiByte( codepage, 0, src.c_str(), -1, encoded_string.data(), encoded_string.size(), nullptr, nullptr); return encoded_string.data(); } +#endif static std::wstring StringDecode( const std::string & src, UINT codepage ) { |
From: <sv...@op...> - 2025-01-02 22:12:38
|
Author: manx Date: Thu Jan 2 23:12:27 2025 New Revision: 22736 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22736 Log: Merged revision(s) 22735 from trunk/OpenMPT: [Fix] mpt/check/libc.hpp: Fix typo in r22717. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/src/mpt/check/libc.hpp Modified: branches/OpenMPT-1.31/src/mpt/check/libc.hpp ============================================================================== --- branches/OpenMPT-1.31/src/mpt/check/libc.hpp Thu Jan 2 23:12:01 2025 (r22735) +++ branches/OpenMPT-1.31/src/mpt/check/libc.hpp Thu Jan 2 23:12:27 2025 (r22736) @@ -32,7 +32,7 @@ #endif #ifndef MPT_CHECK_LIBC_IGNORE_WARNING_UNICODE_MISMATCH -#if MPT_OS_WINDWOS +#if MPT_OS_WINDOWS #ifdef UNICODE #ifndef _UNICODE MPT_WARNING("UNICODE is defined but _UNICODE is not defined. Please #define _UNICODE.") |