summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-03-01 20:49:24 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-03-01 20:49:24 +0300
commit7213d3ecea3157b42f82964a4e6b89f241e8462b (patch)
tree14a86838a05732a7cc99ffc5b1cd704a25f9ee1c
parent72bb63681bce02546d8d6adb99c946c3f7f5ea17 (diff)
CCtrlSpin: correct processing of negative values
-rw-r--r--include/m_gui.h8
-rw-r--r--libs/win32/mir_core.libbin480964 -> 480964 bytes
-rw-r--r--libs/win64/mir_core.libbin486162 -> 486162 bytes
-rw-r--r--src/mir_core/src/Windows/CCtrlSpin.cpp6
-rw-r--r--src/mir_core/src/mir_core.def6
-rw-r--r--src/mir_core/src/mir_core64.def6
6 files changed, 13 insertions, 13 deletions
diff --git a/include/m_gui.h b/include/m_gui.h
index 364a255fe2..ba3590b70d 100644
--- a/include/m_gui.h
+++ b/include/m_gui.h
@@ -887,18 +887,18 @@ class MIR_CORE_EXPORT CCtrlSpin : public CCtrlData
{
typedef CCtrlData CSuper;
- uint16_t m_wMin, m_wMax, m_wCurr;
+ int16_t m_wMin, m_wMax, m_wCurr;
BOOL OnNotify(int, NMHDR*) override;
public:
- CCtrlSpin(CDlgBase *dlg, int ctrlId, uint16_t max = 100, uint16_t min = 0);
+ CCtrlSpin(CDlgBase *dlg, int ctrlId, int16_t max = 100, int16_t min = 0);
bool OnApply() override;
void OnReset() override;
- uint16_t GetPosition();
- void SetPosition(uint16_t pos);
+ int16_t GetPosition();
+ void SetPosition(int16_t pos);
};
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/libs/win32/mir_core.lib b/libs/win32/mir_core.lib
index 3ff951e111..d93c1fdea8 100644
--- a/libs/win32/mir_core.lib
+++ b/libs/win32/mir_core.lib
Binary files differ
diff --git a/libs/win64/mir_core.lib b/libs/win64/mir_core.lib
index 7a4e72c290..9f95adc332 100644
--- a/libs/win64/mir_core.lib
+++ b/libs/win64/mir_core.lib
Binary files differ
diff --git a/src/mir_core/src/Windows/CCtrlSpin.cpp b/src/mir_core/src/Windows/CCtrlSpin.cpp
index 0b4e13cffc..54d43e933a 100644
--- a/src/mir_core/src/Windows/CCtrlSpin.cpp
+++ b/src/mir_core/src/Windows/CCtrlSpin.cpp
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/////////////////////////////////////////////////////////////////////////////////////////
// CCtrlSpin class
-CCtrlSpin::CCtrlSpin(CDlgBase *dlg, int ctrlId, uint16_t wMax, uint16_t wMin) :
+CCtrlSpin::CCtrlSpin(CDlgBase *dlg, int ctrlId, int16_t wMax, int16_t wMin) :
CCtrlData(dlg, ctrlId),
m_wMin(wMin),
m_wMax(wMax),
@@ -70,12 +70,12 @@ void CCtrlSpin::OnReset()
SetPosition(LoadInt());
}
-uint16_t CCtrlSpin::GetPosition()
+int16_t CCtrlSpin::GetPosition()
{
return m_wCurr;
}
-void CCtrlSpin::SetPosition(uint16_t wPos)
+void CCtrlSpin::SetPosition(int16_t wPos)
{
SendMsg(UDM_SETPOS, 0, m_wCurr = wPos);
}
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def
index 4eddd40de0..021c8d309b 100644
--- a/src/mir_core/src/mir_core.def
+++ b/src/mir_core/src/mir_core.def
@@ -950,7 +950,7 @@ db_get_contact_count @1158
db_is_contact @1159
db_set_safety_mode @1160
db_delete_module @1161
-??0CCtrlSpin@@QAE@PAVCDlgBase@@HGG@Z @1163 NONAME
+??0CCtrlSpin@@QAE@PAVCDlgBase@@HFF@Z @1163 NONAME
??1CCtrlSpin@@UAE@XZ @1164 NONAME
??_7CCtrlSpin@@6B@ @1166 NONAME
?SetMaxLength@CCtrlEdit@@QAEXI@Z @1167 NONAME
@@ -977,8 +977,8 @@ CallFunctionSync @1170
?GetItemRect@CCtrlListBox@@QBEHHPAUtagRECT@@@Z @1193 NONAME
?SetItemHeight@CCtrlListBox@@QAEXHH@Z @1194 NONAME
?UseSystemColors@CCtrlBase@@QAEXXZ @1195 NONAME
-?SetPosition@CCtrlSpin@@QAEXG@Z @1196 NONAME
-?GetPosition@CCtrlSpin@@QAEGXZ @1197 NONAME
+?GetPosition@CCtrlSpin@@QAEFXZ @1196 NONAME
+?SetPosition@CCtrlSpin@@QAEXF@Z @1197 NONAME
?OnNotify@CCtrlSpin@@EAEHHPAUtagNMHDR@@@Z @1198 NONAME
?GetCount@CCtrlPages@@QAEHXZ @1199 NONAME
?GetActivePage@CCtrlPages@@QBEPAVCDlgBase@@XZ @1200 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def
index eb527bf8be..7a4fc63354 100644
--- a/src/mir_core/src/mir_core64.def
+++ b/src/mir_core/src/mir_core64.def
@@ -950,7 +950,7 @@ db_get_contact_count @1158
db_is_contact @1159
db_set_safety_mode @1160
db_delete_module @1161
-??0CCtrlSpin@@QEAA@PEAVCDlgBase@@HGG@Z @1163 NONAME
+??0CCtrlSpin@@QEAA@PEAVCDlgBase@@HFF@Z @1162 NONAME
??1CCtrlSpin@@UEAA@XZ @1164 NONAME
??_7CCtrlSpin@@6B@ @1166 NONAME
?SetMaxLength@CCtrlEdit@@QEAAXI@Z @1167 NONAME
@@ -977,8 +977,8 @@ CallFunctionSync @1170
?GetItemRect@CCtrlListBox@@QEBAHHPEAUtagRECT@@@Z @1193 NONAME
?SetItemHeight@CCtrlListBox@@QEAAXHH@Z @1194 NONAME
?UseSystemColors@CCtrlBase@@QEAAXXZ @1195 NONAME
-?SetPosition@CCtrlSpin@@QEAAXG@Z @1196 NONAME
-?GetPosition@CCtrlSpin@@QEAAGXZ @1197 NONAME
+?GetPosition@CCtrlSpin@@QEAAFXZ @1196 NONAME
+?SetPosition@CCtrlSpin@@QEAAXF@Z @1197 NONAME
?OnNotify@CCtrlSpin@@EEAAHHPEAUtagNMHDR@@@Z @1198 NONAME
?GetCount@CCtrlPages@@QEAAHXZ @1199 NONAME
?GetActivePage@CCtrlPages@@QEBAPEAVCDlgBase@@XZ @1200 NONAME