From 94ff669775cdd5fdc5985d36acc8639a89a5c37d Mon Sep 17 00:00:00 2001 From: Andrea Odetti Date: Thu, 19 Dec 2024 09:38:16 +0000 Subject: [PATCH] Replace DWORD -> uint32_t. Signed-off-by: Andrea Odetti --- source/frontends/common2/commonframe.cpp | 16 +++++++------- source/frontends/common2/commonframe.h | 4 ++-- source/frontends/common2/ptreeregistry.cpp | 6 ++--- source/frontends/common2/ptreeregistry.h | 4 ++-- source/frontends/common2/speed.cpp | 2 +- source/frontends/common2/utils.cpp | 6 ++--- source/frontends/libretro/game.cpp | 2 +- source/frontends/libretro/retroregistry.cpp | 22 +++++++++---------- source/frontends/qt/configuration.cpp | 4 ++-- source/frontends/qt/configuration.h | 4 ++-- source/frontends/qt/qapple.cpp | 4 ++-- source/frontends/qt/qdirectsound.cpp | 2 +- source/frontends/qt/qtframe.cpp | 2 +- source/frontends/qt/qtframe.h | 2 +- source/frontends/sdl/imgui/sdldebugger.cpp | 2 +- source/frontends/sdl/imgui/sdldebugger.h | 4 ++-- source/frontends/sdl/imgui/sdlsettings.cpp | 4 ++-- source/frontends/sdl/imgui/settingshelper.cpp | 2 +- source/frontends/sdl/imgui/settingshelper.h | 2 +- source/frontends/sdl/sdirectsound.cpp | 4 ++-- source/linux/benchmark.cpp | 2 +- source/linux/duplicates/Joystick.cpp | 2 +- source/linux/duplicates/PropertySheet.cpp | 2 +- source/linux/duplicates/tfearch.cpp | 2 +- source/linux/registryclass.cpp | 10 ++++----- source/linux/registryclass.h | 10 ++++----- 26 files changed, 63 insertions(+), 63 deletions(-) diff --git a/source/frontends/common2/commonframe.cpp b/source/frontends/common2/commonframe.cpp index ad30ead14..455d269fe 100644 --- a/source/frontends/common2/commonframe.cpp +++ b/source/frontends/common2/commonframe.cpp @@ -36,7 +36,7 @@ namespace common2 ResetHardware(); } - BYTE* CommonFrame::GetResource(WORD id, LPCSTR lpType, DWORD expectedSize) + BYTE* CommonFrame::GetResource(WORD id, LPCSTR lpType, uint32_t expectedSize) { myResource.clear(); @@ -138,7 +138,7 @@ namespace common2 void CommonFrame::ExecuteInRunningMode(const int64_t microseconds) { SetFullSpeed(CanDoFullSpeed()); - const DWORD cyclesToExecute = mySpeed.getCyclesTillNext(microseconds); // this checks g_bFullSpeed + const uint32_t cyclesToExecute = mySpeed.getCyclesTillNext(microseconds); // this checks g_bFullSpeed Execute(cyclesToExecute); } @@ -146,7 +146,7 @@ namespace common2 { // In AppleWin this is called without a timer for just one iteration // because we run a "frame" at a time, we need a bit of ingenuity - const DWORD cyclesToExecute = mySpeed.getCyclesAtFixedSpeed(microseconds); + const uint32_t cyclesToExecute = mySpeed.getCyclesAtFixedSpeed(microseconds); const int64_t target = g_nCumulativeCycles + cyclesToExecute; while (g_nAppMode == MODE_STEPPING && g_nCumulativeCycles < target) @@ -155,21 +155,21 @@ namespace common2 } } - void CommonFrame::Execute(const DWORD cyclesToExecute) + void CommonFrame::Execute(const uint32_t cyclesToExecute) { const bool bVideoUpdate = myAllowVideoUpdate && !g_bFullSpeed; const UINT dwClksPerFrame = NTSC_GetCyclesPerFrame(); // do it in the same batches as AppleWin (1 ms) - const DWORD fExecutionPeriodClks = g_fCurrentCLK6502 * (1.0 / 1000.0); // 1 ms + const uint32_t fExecutionPeriodClks = g_fCurrentCLK6502 * (1.0 / 1000.0); // 1 ms - DWORD totalCyclesExecuted = 0; + uint32_t totalCyclesExecuted = 0; // check at the end because we want to always execute at least 1 cycle even for "0" do { _ASSERT(cyclesToExecute >= totalCyclesExecuted); - const DWORD thisCyclesToExecute = std::min(fExecutionPeriodClks, cyclesToExecute - totalCyclesExecuted); - const DWORD executedCycles = CpuExecute(thisCyclesToExecute, bVideoUpdate); + const uint32_t thisCyclesToExecute = std::min(fExecutionPeriodClks, cyclesToExecute - totalCyclesExecuted); + const uint32_t executedCycles = CpuExecute(thisCyclesToExecute, bVideoUpdate); totalCyclesExecuted += executedCycles; GetCardMgr().Update(executedCycles); diff --git a/source/frontends/common2/commonframe.h b/source/frontends/common2/commonframe.h index 6b0d62a52..82f341536 100644 --- a/source/frontends/common2/commonframe.h +++ b/source/frontends/common2/commonframe.h @@ -20,7 +20,7 @@ namespace common2 void Begin() override; - BYTE* GetResource(WORD id, LPCSTR lpType, DWORD expectedSize) override; + BYTE* GetResource(WORD id, LPCSTR lpType, uint32_t expectedSize) override; virtual void ResetSpeed(); @@ -49,7 +49,7 @@ namespace common2 void ExecuteInRunningMode(const int64_t microseconds); void ExecuteInDebugMode(const int64_t microseconds); - void Execute(const DWORD uCycles); + void Execute(const uint32_t uCycles); Speed mySpeed; diff --git a/source/frontends/common2/ptreeregistry.cpp b/source/frontends/common2/ptreeregistry.cpp index f6f47de60..b6474db07 100644 --- a/source/frontends/common2/ptreeregistry.cpp +++ b/source/frontends/common2/ptreeregistry.cpp @@ -32,9 +32,9 @@ namespace common2 return getValue(section, key); } - DWORD PTreeRegistry::getDWord(const std::string & section, const std::string & key) const + uint32_t PTreeRegistry::getDWord(const std::string & section, const std::string & key) const { - return getValue(section, key); + return getValue(section, key); } bool PTreeRegistry::getBool(const std::string & section, const std::string & key) const @@ -47,7 +47,7 @@ namespace common2 putValue(section, key, value); } - void PTreeRegistry::putDWord(const std::string & section, const std::string & key, const DWORD value) + void PTreeRegistry::putDWord(const std::string & section, const std::string & key, const uint32_t value) { putValue(section, key, value); } diff --git a/source/frontends/common2/ptreeregistry.h b/source/frontends/common2/ptreeregistry.h index f2779412c..0b548d477 100644 --- a/source/frontends/common2/ptreeregistry.h +++ b/source/frontends/common2/ptreeregistry.h @@ -21,11 +21,11 @@ namespace common2 typedef boost::property_tree::basic_ptree ini_t; std::string getString(const std::string & section, const std::string & key) const override; - DWORD getDWord(const std::string & section, const std::string & key) const override; + uint32_t getDWord(const std::string & section, const std::string & key) const override; bool getBool(const std::string & section, const std::string & key) const override; void putString(const std::string & section, const std::string & key, const std::string & value) override; - void putDWord(const std::string & section, const std::string & key, const DWORD value) override; + void putDWord(const std::string & section, const std::string & key, const uint32_t value) override; template T getValue(const std::string & section, const std::string & key) const; diff --git a/source/frontends/common2/speed.cpp b/source/frontends/common2/speed.cpp index eb2eabda8..6035a64ab 100644 --- a/source/frontends/common2/speed.cpp +++ b/source/frontends/common2/speed.cpp @@ -15,7 +15,7 @@ namespace uint32_t checkAndReturn(const int64_t cycles) { - // AppleWin uses DWORD, so we check the value is sound + // AppleWin uses uint32_t, so we check the value is sound const int64_t cyclesToExecute = std::max(0, cycles); _ASSERT(cyclesToExecute <= std::numeric_limits::max()); diff --git a/source/frontends/common2/utils.cpp b/source/frontends/common2/utils.cpp index 965bd72bb..063b5c9e1 100644 --- a/source/frontends/common2/utils.cpp +++ b/source/frontends/common2/utils.cpp @@ -32,12 +32,12 @@ namespace common2 const std::string path = section + "\\geometry"; const auto loadValue = [&path](const char * name, int & dest) { - DWORD value; + uint32_t value; if (RegLoadValue(path.c_str(), name, TRUE, &value)) { - // DWORD and int have the same size + // uint32_t and int have the same size // but if they did not, this would be necessary - typedef std::make_signed::type signed_t; + typedef std::make_signed::type signed_t; dest = static_cast(value); } }; diff --git a/source/frontends/libretro/game.cpp b/source/frontends/libretro/game.cpp index 90350054f..7bbd2d016 100644 --- a/source/frontends/libretro/game.cpp +++ b/source/frontends/libretro/game.cpp @@ -98,7 +98,7 @@ namespace ra2 const VideoType_e prevVideoType = video.GetVideoType(); const VideoStyle_e prevVideoStyle = video.GetVideoStyle(); - DWORD dwTmp = prevVideoType; + uint32_t dwTmp = prevVideoType; RegLoadValue(REG_CONFIG, REGVALUE_VIDEO_MODE, TRUE, &dwTmp); const VideoType_e newVideoType = static_cast(dwTmp); diff --git a/source/frontends/libretro/retroregistry.cpp b/source/frontends/libretro/retroregistry.cpp index 6f4e95553..77e42af26 100644 --- a/source/frontends/libretro/retroregistry.cpp +++ b/source/frontends/libretro/retroregistry.cpp @@ -28,7 +28,7 @@ namespace std::string description; std::string section; std::string key; - std::vector > values; + std::vector > values; }; const std::vector ourVariables = @@ -128,8 +128,8 @@ namespace REG_RA2, REGVALUE_AUDIO_SOURCE, { - {REGVALUE_AUDIO_SPEAKER, static_cast(ra2::AudioSource::SPEAKER)}, - {REGVALUE_AUDIO_MOCKINGBOARD, static_cast(ra2::AudioSource::MOCKINGBOARD)}, + {REGVALUE_AUDIO_SPEAKER, static_cast(ra2::AudioSource::SPEAKER)}, + {REGVALUE_AUDIO_MOCKINGBOARD, static_cast(ra2::AudioSource::MOCKINGBOARD)}, } }, { @@ -138,8 +138,8 @@ namespace REG_RA2, REGVALUE_KEYBOARD_TYPE, { - {"ASCII", static_cast(ra2::KeyboardType::ASCII)}, - {"Original", static_cast(ra2::KeyboardType::Original)}, + {"ASCII", static_cast(ra2::KeyboardType::ASCII)}, + {"Original", static_cast(ra2::KeyboardType::Original)}, } }, { @@ -148,8 +148,8 @@ namespace REG_RA2, REGVALUE_PLAYLIST_START, { - {"First", static_cast(ra2::PlaylistStartDisk::First)}, - {"Previous", static_cast(ra2::PlaylistStartDisk::Previous)}, + {"First", static_cast(ra2::PlaylistStartDisk::First)}, + {"Previous", static_cast(ra2::PlaylistStartDisk::Previous)}, } }, }; @@ -232,22 +232,22 @@ namespace ra2 AudioSource GetAudioSource() { - DWORD value = 1; + uint32_t value = 1; RegLoadValue(REG_RA2, REGVALUE_AUDIO_SOURCE, TRUE, &value); - const AudioSource source = value <= DWORD(AudioSource::UNKNOWN) ? AudioSource(value) : AudioSource::UNKNOWN; + const AudioSource source = value <= uint32_t(AudioSource::UNKNOWN) ? AudioSource(value) : AudioSource::UNKNOWN; return source; } KeyboardType GetKeyboardEmulationType() { - DWORD value = static_cast(KeyboardType::ASCII); + uint32_t value = static_cast(KeyboardType::ASCII); RegLoadValue(REG_RA2, REGVALUE_KEYBOARD_TYPE, TRUE, &value); return static_cast(value); } PlaylistStartDisk GetPlaylistStartDisk() { - DWORD value = static_cast(PlaylistStartDisk::First); + uint32_t value = static_cast(PlaylistStartDisk::First); RegLoadValue(REG_RA2, REGVALUE_PLAYLIST_START, TRUE, &value); return static_cast(value); } diff --git a/source/frontends/qt/configuration.cpp b/source/frontends/qt/configuration.cpp index 91d14d184..3337cd924 100644 --- a/source/frontends/qt/configuration.cpp +++ b/source/frontends/qt/configuration.cpp @@ -28,7 +28,7 @@ std::string Configuration::getString(const std::string & section, const std::str return res; } -DWORD Configuration::getDWord(const std::string & section, const std::string & key) const +uint32_t Configuration::getDWord(const std::string & section, const std::string & key) const { const QVariant value = getVariant(section, key); const uint res = value.toUInt(); @@ -48,7 +48,7 @@ void Configuration::putString(const std::string & section, const std::string & k mySettings.setValue(getKey(section, key), QVariant::fromValue(s)); } -void Configuration::putDWord(const std::string & section, const std::string & key, const DWORD value) +void Configuration::putDWord(const std::string & section, const std::string & key, const uint32_t value) { mySettings.setValue(getKey(section, key), QVariant::fromValue(value)); } diff --git a/source/frontends/qt/configuration.h b/source/frontends/qt/configuration.h index 9aba0c14b..7a30da61c 100644 --- a/source/frontends/qt/configuration.h +++ b/source/frontends/qt/configuration.h @@ -9,11 +9,11 @@ class Configuration : public Registry { public: std::string getString(const std::string & section, const std::string & key) const override; - DWORD getDWord(const std::string & section, const std::string & key) const override; + uint32_t getDWord(const std::string & section, const std::string & key) const override; bool getBool(const std::string & section, const std::string & key) const override; void putString(const std::string & section, const std::string & key, const std::string & value) override; - void putDWord(const std::string & section, const std::string & key, const DWORD value) override; + void putDWord(const std::string & section, const std::string & key, const uint32_t value) override; std::map> getAllValues() const override; diff --git a/source/frontends/qt/qapple.cpp b/source/frontends/qt/qapple.cpp index 194ac69d4..951e4f244 100644 --- a/source/frontends/qt/qapple.cpp +++ b/source/frontends/qt/qapple.cpp @@ -196,7 +196,7 @@ void QApple::on_timer() const qint64 maximumToRun = 10 * myOptions.msGap * audioAdjustedSpeed * 1.0e-3; // just to avoid crazy times (e.g. debugging) const qint64 toRun = std::min(targetCycles - currentCycles, maximumToRun); - const DWORD uCyclesToExecute = toRun; + const uint32_t uCyclesToExecute = toRun; const bool bVideoUpdate = true; @@ -208,7 +208,7 @@ void QApple::on_timer() int count = 0; do { - const DWORD uActualCyclesExecuted = CpuExecute(uCyclesToExecute, bVideoUpdate); + const uint32_t uActualCyclesExecuted = CpuExecute(uCyclesToExecute, bVideoUpdate); g_dwCyclesThisFrame += uActualCyclesExecuted; cardManager.Update(uActualCyclesExecuted); SpkrUpdate(uActualCyclesExecuted); diff --git a/source/frontends/qt/qdirectsound.cpp b/source/frontends/qt/qdirectsound.cpp index d52cc31be..af307e0be 100644 --- a/source/frontends/qt/qdirectsound.cpp +++ b/source/frontends/qt/qdirectsound.cpp @@ -156,7 +156,7 @@ namespace if (info.running) { - const DWORD bytesInBuffer = GetBytesInBuffer(); + const uint32_t bytesInBuffer = GetBytesInBuffer(); const auto & format = myAudioOutput->format(); info.buffer = format.durationForBytes(bytesInBuffer) / 1000; info.size = format.durationForBytes(myBufferSize) / 1000; diff --git a/source/frontends/qt/qtframe.cpp b/source/frontends/qt/qtframe.cpp index 711dfa46f..d3e48b6b4 100644 --- a/source/frontends/qt/qtframe.cpp +++ b/source/frontends/qt/qtframe.cpp @@ -121,7 +121,7 @@ void QtFrame::GetBitmap(LPCSTR lpBitmapName, LONG cb, LPVOID lpvBits) } } -BYTE* QtFrame::GetResource(WORD id, LPCSTR lpType, DWORD expectedSize) +BYTE* QtFrame::GetResource(WORD id, LPCSTR lpType, uint32_t expectedSize) { Q_UNUSED(lpType); myResource.clear(); diff --git a/source/frontends/qt/qtframe.h b/source/frontends/qt/qtframe.h index 4b99a08ae..323f5d230 100644 --- a/source/frontends/qt/qtframe.h +++ b/source/frontends/qt/qtframe.h @@ -21,7 +21,7 @@ class QtFrame : public LinuxFrame int FrameMessageBox(LPCSTR lpText, LPCSTR lpCaption, UINT uType) override; void GetBitmap(LPCSTR lpBitmapName, LONG cb, LPVOID lpvBits) override; - BYTE* GetResource(WORD id, LPCSTR lpType, DWORD expectedSize) override; + BYTE* GetResource(WORD id, LPCSTR lpType, uint32_t expectedSize) override; std::string Video_GetScreenShotFolder() const override; void SetForceRepaint(const bool force); diff --git a/source/frontends/sdl/imgui/sdldebugger.cpp b/source/frontends/sdl/imgui/sdldebugger.cpp index 6ad442195..bf24bb512 100644 --- a/source/frontends/sdl/imgui/sdldebugger.cpp +++ b/source/frontends/sdl/imgui/sdldebugger.cpp @@ -737,7 +737,7 @@ namespace sa2 } } - void ImGuiDebugger::setCurrentAddress(const DWORD nAddress) + void ImGuiDebugger::setCurrentAddress(const uint32_t nAddress) { g_nDisasmCurAddress = nAddress; DisasmCalcTopBotAddress(); diff --git a/source/frontends/sdl/imgui/sdldebugger.h b/source/frontends/sdl/imgui/sdldebugger.h index b24f40fae..73435cc70 100644 --- a/source/frontends/sdl/imgui/sdldebugger.h +++ b/source/frontends/sdl/imgui/sdldebugger.h @@ -25,7 +25,7 @@ namespace sa2 bool myScrollConsole = true; int64_t myBaseDebuggerCycles; - std::unordered_map myAddressCycles; + std::unordered_map myAddressCycles; CycleTabItems myCycleTabItems; InputTextHistory myInputTextHistory; @@ -42,7 +42,7 @@ namespace sa2 void processDebuggerKeys(); - void setCurrentAddress(const DWORD nAddress); + void setCurrentAddress(const uint32_t nAddress); }; } \ No newline at end of file diff --git a/source/frontends/sdl/imgui/sdlsettings.cpp b/source/frontends/sdl/imgui/sdlsettings.cpp index e2e6e60be..00c1a49d1 100644 --- a/source/frontends/sdl/imgui/sdlsettings.cpp +++ b/source/frontends/sdl/imgui/sdlsettings.cpp @@ -104,7 +104,7 @@ namespace } } - void setSpeedMultiplier(sa2::SDLFrame* frame, const DWORD speedMultiplier) + void setSpeedMultiplier(sa2::SDLFrame* frame, const uint32_t speedMultiplier) { g_dwSpeed = speedMultiplier; SetCurrentCLK6502(); @@ -354,7 +354,7 @@ namespace sa2 if (ImGui::Checkbox("Enhanced speed", &enhancedSpeed)) { cardManager.GetDisk2CardMgr().SetEnhanceDisk(enhancedSpeed); - REGSAVE(TEXT(REGVALUE_ENHANCE_DISK_SPEED), (DWORD)enhancedSpeed); + REGSAVE(TEXT(REGVALUE_ENHANCE_DISK_SPEED), (uint32_t)enhancedSpeed); } ImGui::Separator(); diff --git a/source/frontends/sdl/imgui/settingshelper.cpp b/source/frontends/sdl/imgui/settingshelper.cpp index 320dfe5fc..f178aa176 100644 --- a/source/frontends/sdl/imgui/settingshelper.cpp +++ b/source/frontends/sdl/imgui/settingshelper.cpp @@ -241,7 +241,7 @@ namespace sa2 REGSAVE(TEXT(REGVALUE_UTHERNET_ACTIVE), enabled); } - void changeBreakpoint(const DWORD nAddress, const bool enableAndSet) + void changeBreakpoint(const uint32_t nAddress, const bool enableAndSet) { // see _BWZ_RemoveOne for (Breakpoint_t & bp : g_aBreakpoints) diff --git a/source/frontends/sdl/imgui/settingshelper.h b/source/frontends/sdl/imgui/settingshelper.h index 6b2776975..baf0172d0 100644 --- a/source/frontends/sdl/imgui/settingshelper.h +++ b/source/frontends/sdl/imgui/settingshelper.h @@ -96,7 +96,7 @@ namespace sa2 void saveTFEEnabled(const int enabled); - void changeBreakpoint(const DWORD nAddress, const bool enableAndSet); + void changeBreakpoint(const uint32_t nAddress, const bool enableAndSet); ImVec4 colorrefToImVec4(const COLORREF cr); COLORREF imVec4ToColorref(const ImVec4 & color); diff --git a/source/frontends/sdl/sdirectsound.cpp b/source/frontends/sdl/sdirectsound.cpp index dd9d3df6a..cfb53858a 100644 --- a/source/frontends/sdl/sdirectsound.cpp +++ b/source/frontends/sdl/sdirectsound.cpp @@ -162,7 +162,7 @@ namespace void DirectSoundGenerator::printInfo() { - const DWORD bytesInBuffer = GetBytesInBuffer(); + const uint32_t bytesInBuffer = GetBytesInBuffer(); std::cerr << "Channels: " << (int)myAudioSpec.channels; std::cerr << ", buffer: " << std::setw(6) << bytesInBuffer; const double time = double(bytesInBuffer) / myBytesPerSecond * 1000; @@ -184,7 +184,7 @@ namespace if (info.running && myBytesPerSecond > 0) { - const DWORD bytesInBuffer = GetBytesInBuffer(); + const uint32_t bytesInBuffer = GetBytesInBuffer(); const float coeff = 1.0 / myBytesPerSecond; info.buffer = bytesInBuffer * coeff; info.size = myBufferSize * coeff; diff --git a/source/linux/benchmark.cpp b/source/linux/benchmark.cpp index e534feedf..d5d60aeff 100644 --- a/source/linux/benchmark.cpp +++ b/source/linux/benchmark.cpp @@ -137,7 +137,7 @@ void VideoBenchmark(std::function redraw, std::function refresh) do { // this is a simplified version of AppleWin.cpp:ContinueExecution() - const DWORD executedcycles = CpuExecute(cyclesPerMs, true); + const uint32_t executedcycles = CpuExecute(cyclesPerMs, true); cyclesThisFrame += executedcycles; // every ms disk and joystick are updated GetCardMgr().GetDisk2CardMgr().Update(executedcycles); diff --git a/source/linux/duplicates/Joystick.cpp b/source/linux/duplicates/Joystick.cpp index 34bdf8642..172fd8bdf 100644 --- a/source/linux/duplicates/Joystick.cpp +++ b/source/linux/duplicates/Joystick.cpp @@ -14,7 +14,7 @@ void JoySetTrim(short nValue, bool bAxisX) { } -void JoySetJoyType(UINT num, DWORD type) +void JoySetJoyType(UINT num, uint32_t type) { } diff --git a/source/linux/duplicates/PropertySheet.cpp b/source/linux/duplicates/PropertySheet.cpp index a94307331..be5d51757 100644 --- a/source/linux/duplicates/PropertySheet.cpp +++ b/source/linux/duplicates/PropertySheet.cpp @@ -6,7 +6,7 @@ void CPropertySheet::Init(void) { } -DWORD CPropertySheet::GetVolumeMax(void) +uint32_t CPropertySheet::GetVolumeMax(void) { return 99; } diff --git a/source/linux/duplicates/tfearch.cpp b/source/linux/duplicates/tfearch.cpp index 3bca0b64c..158d5d8df 100644 --- a/source/linux/duplicates/tfearch.cpp +++ b/source/linux/duplicates/tfearch.cpp @@ -69,7 +69,7 @@ void tfe_arch_set_mac( const BYTE mac[6] ) #endif } -void tfe_arch_set_hashfilter(const DWORD hash_mask[2]) +void tfe_arch_set_hashfilter(const uint32_t hash_mask[2]) { #if defined(TFE_DEBUG_ARCH) || defined(TFE_DEBUG_FRAMES) if(g_fh) fprintf( g_fh, "New hash filter set: %08X:%08X.\n", diff --git a/source/linux/registryclass.cpp b/source/linux/registryclass.cpp index f7d493a2f..4128542d3 100644 --- a/source/linux/registryclass.cpp +++ b/source/linux/registryclass.cpp @@ -4,7 +4,7 @@ std::shared_ptr Registry::instance; -BOOL RegLoadString (LPCTSTR section, LPCTSTR key, BOOL peruser, LPTSTR buffer, DWORD chars, LPCTSTR defaultValue) +BOOL RegLoadString (LPCTSTR section, LPCTSTR key, BOOL peruser, LPTSTR buffer, uint32_t chars, LPCTSTR defaultValue) { BOOL success = RegLoadString(section, key, peruser, buffer, chars); if (!success) @@ -12,7 +12,7 @@ BOOL RegLoadString (LPCTSTR section, LPCTSTR key, BOOL peruser, LPTSTR buffer, D return success; } -BOOL RegLoadValue (LPCTSTR section, LPCTSTR key, BOOL peruser, DWORD* value, DWORD defaultValue) { +BOOL RegLoadValue (LPCTSTR section, LPCTSTR key, BOOL peruser, uint32_t* value, uint32_t defaultValue) { BOOL success = RegLoadValue(section, key, peruser, value); if (!success) *value = defaultValue; @@ -20,7 +20,7 @@ BOOL RegLoadValue (LPCTSTR section, LPCTSTR key, BOOL peruser, DWORD* value, DWO } BOOL RegLoadString (LPCTSTR section, LPCTSTR key, BOOL peruser, - LPTSTR buffer, DWORD chars) + LPTSTR buffer, uint32_t chars) { BOOL result; try @@ -39,7 +39,7 @@ BOOL RegLoadString (LPCTSTR section, LPCTSTR key, BOOL peruser, return result; } -BOOL RegLoadValue (LPCTSTR section, LPCTSTR key, BOOL peruser, DWORD *value) +BOOL RegLoadValue (LPCTSTR section, LPCTSTR key, BOOL peruser, uint32_t *value) { BOOL result; try @@ -79,7 +79,7 @@ void RegSaveString (LPCTSTR section, LPCTSTR key, BOOL peruser, const std::strin LogFileOutput("RegSaveString: %s - %s = %s\n", section, key, buffer.c_str()); } -void RegSaveValue (LPCTSTR section, LPCTSTR key, BOOL peruser, DWORD value) +void RegSaveValue (LPCTSTR section, LPCTSTR key, BOOL peruser, uint32_t value) { Registry::instance->putDWord(section, key, value); LogFileOutput("RegSaveValue: %s - %s = %d\n", section, key, value); diff --git a/source/linux/registryclass.h b/source/linux/registryclass.h index 81df926e4..c2f8921be 100644 --- a/source/linux/registryclass.h +++ b/source/linux/registryclass.h @@ -14,18 +14,18 @@ class Registry static std::shared_ptr instance; virtual std::string getString(const std::string & section, const std::string & key) const = 0; - virtual DWORD getDWord(const std::string & section, const std::string & key) const = 0; + virtual uint32_t getDWord(const std::string & section, const std::string & key) const = 0; virtual bool getBool(const std::string & section, const std::string & key) const = 0; virtual void putString(const std::string & section, const std::string & key, const std::string & value) = 0; - virtual void putDWord(const std::string & section, const std::string & key, const DWORD value) = 0; + virtual void putDWord(const std::string & section, const std::string & key, const uint32_t value) = 0; virtual std::map> getAllValues() const = 0; }; -BOOL RegLoadString (LPCTSTR section, LPCTSTR key, BOOL peruser, LPTSTR buffer, DWORD chars); -BOOL RegLoadValue (LPCTSTR section, LPCTSTR key, BOOL peruser, DWORD *value); +BOOL RegLoadString (LPCTSTR section, LPCTSTR key, BOOL peruser, LPTSTR buffer, uint32_t chars); +BOOL RegLoadValue (LPCTSTR section, LPCTSTR key, BOOL peruser, uint32_t *value); BOOL RegLoadValue (LPCTSTR section, LPCTSTR key, BOOL peruser, BOOL *value); void RegSaveString (LPCTSTR section, LPCTSTR key, BOOL peruser, const std::string & buffer); -void RegSaveValue (LPCTSTR section, LPCTSTR key, BOOL peruser, DWORD value); +void RegSaveValue (LPCTSTR section, LPCTSTR key, BOOL peruser, uint32_t value);