mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-20 05:44:59 +01:00
Merge branch 'master' into feat/renderers-cleanup
This commit is contained in:
@@ -35,7 +35,8 @@ decoded_sound decode_sound( std::string const &File ) {
|
||||
SF_INFO si;
|
||||
si.format = 0;
|
||||
|
||||
SNDFILE *sf = sf_open(File.c_str(), SFM_READ, &si);
|
||||
// the file as it's named on the disk, the name of the buffer is in lowercase
|
||||
SNDFILE *sf = sf_open(FileOnDisk(File).c_str(), SFM_READ, &si);
|
||||
|
||||
if (sf == nullptr)
|
||||
throw std::runtime_error("sound: sf_open failed");
|
||||
@@ -216,9 +217,9 @@ openal_buffer::fetch_caption() {
|
||||
std::string captionfilename { name };
|
||||
captionfilename.erase( captionfilename.rfind( '.' ) ); // obcięcie rozszerzenia
|
||||
captionfilename += "-" + Global.asLang + ".txt"; // już może być w różnych językach
|
||||
if( true == FileExists( captionfilename ) ) {
|
||||
if( auto const casedfilename { FileCased( captionfilename ) }; false == casedfilename.empty() ) {
|
||||
// wczytanie
|
||||
std::ifstream inputfile( captionfilename );
|
||||
std::ifstream inputfile( casedfilename );
|
||||
caption.assign( std::istreambuf_iterator<char>( inputfile ), std::istreambuf_iterator<char>() );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user