mikmod: fix compilation on Windows
NarrowPath is needed. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
bcd55c0b75
commit
4957035be6
@ -7,6 +7,7 @@
|
|||||||
#include "lib/fmt/PathFormatter.hxx"
|
#include "lib/fmt/PathFormatter.hxx"
|
||||||
#include "lib/fmt/RuntimeError.hxx"
|
#include "lib/fmt/RuntimeError.hxx"
|
||||||
#include "tag/Handler.hxx"
|
#include "tag/Handler.hxx"
|
||||||
|
#include "fs/NarrowPath.hxx"
|
||||||
#include "fs/Path.hxx"
|
#include "fs/Path.hxx"
|
||||||
#include "util/Domain.hxx"
|
#include "util/Domain.hxx"
|
||||||
#include "Log.hxx"
|
#include "Log.hxx"
|
||||||
@ -128,9 +129,10 @@ mikmod_decoder_finish() noexcept
|
|||||||
static void
|
static void
|
||||||
mikmod_decoder_file_decode(DecoderClient &client, Path path_fs)
|
mikmod_decoder_file_decode(DecoderClient &client, Path path_fs)
|
||||||
{
|
{
|
||||||
|
auto np = NarrowPath(path_fs);
|
||||||
/* deconstify the path because libmikmod wants a non-const
|
/* deconstify the path because libmikmod wants a non-const
|
||||||
string pointer */
|
string pointer */
|
||||||
char *const path2 = const_cast<char *>(path_fs.c_str());
|
const auto path2 = const_cast<char *>(np.c_str());
|
||||||
|
|
||||||
MODULE *handle;
|
MODULE *handle;
|
||||||
int ret;
|
int ret;
|
||||||
@ -167,9 +169,10 @@ mikmod_decoder_file_decode(DecoderClient &client, Path path_fs)
|
|||||||
static bool
|
static bool
|
||||||
mikmod_decoder_scan_file(Path path_fs, TagHandler &handler) noexcept
|
mikmod_decoder_scan_file(Path path_fs, TagHandler &handler) noexcept
|
||||||
{
|
{
|
||||||
|
auto np = NarrowPath(path_fs);
|
||||||
/* deconstify the path because libmikmod wants a non-const
|
/* deconstify the path because libmikmod wants a non-const
|
||||||
string pointer */
|
string pointer */
|
||||||
char *const path2 = const_cast<char *>(path_fs.c_str());
|
const auto path2 = const_cast<char *>(np.c_str());
|
||||||
|
|
||||||
MODULE *handle = Player_Load(path2, 128, 0);
|
MODULE *handle = Player_Load(path2, 128, 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user