summaryrefslogtreecommitdiff
path: root/src/d/d_dvd.cpp
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2024-05-29 21:45:20 +0200
committerrobojumper <robojumper@gmail.com>2024-06-02 00:06:17 +0200
commit892a040a97251463297db6f2b8eeaa95f69f4eea (patch)
tree20171290d76a57bda91e7e047813e46615c34c77 /src/d/d_dvd.cpp
parente6429777e5090a5cc07c0fa1fe1fe91d42a772af (diff)
oarc_manager
Diffstat (limited to 'src/d/d_dvd.cpp')
-rw-r--r--src/d/d_dvd.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/d/d_dvd.cpp b/src/d/d_dvd.cpp
index 2f7b9cfa..3afda769 100644
--- a/src/d/d_dvd.cpp
+++ b/src/d/d_dvd.cpp
@@ -1,6 +1,8 @@
#include <d/d_dvd.h>
#include <m/m_dvd.h>
-
+// clang-format off
+#include <sized_string.h>
+// clang-format on
namespace dDvd {
/** 800520f0 */
@@ -19,25 +21,20 @@ loader_c::loader_c() {
/** 80052130 */
loader_c::~loader_c() {}
-// sprintf2
-extern "C" void fn_8003D650(char *out, const char *fmt, ...);
-
/** 80052170 */
void *loader_c::request(const char *path, u8 mountDirection, EGG::Heap *heap) {
- char buf[128];
-
if (mpBuffer != nullptr) {
return mpBuffer;
}
if (mpCommand == 0) {
mSize = -1;
mpHeap = heap != nullptr ? heap : mDvd::getArchiveHeap();
- buf[0] = '\0';
- fn_8003D650(buf, "US%s", path);
- if (!mDvd::IsExistPath(buf)) {
- fn_8003D650(buf, "%s", path);
+ SizedString<128> buf;
+ buf.sprintf("US%s", path);
+ if (!mDvd::IsExistPath(&buf)) {
+ buf.sprintf("%s", path);
}
- mpCommand = mDvd_toMainRam_normal_c::create(buf, mountDirection, heap);
+ mpCommand = mDvd_toMainRam_normal_c::create(&buf, mountDirection, heap);
}
if (mpCommand != nullptr && mpCommand->mStatus != 0) {
mpBuffer = mpCommand->mDataPtr;