Skip to content

Commit

Permalink
th165 ~ Works For Me (TM).
Browse files Browse the repository at this point in the history
  • Loading branch information
chirs241097 committed Aug 10, 2018
1 parent e53c664 commit c07d8e7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include <QMessageBox>
#include <QMimeData>
#ifdef _WIN32
#define NOMINMAX //Windows API breaks STL, shit.
#include <Windows.h>
#undef min //Windows API breaks STL, shit.
#endif

MainWindow::MainWindow(QWidget *parent) :
Expand Down
1 change: 0 additions & 1 deletion songlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ bool SongList::LoadFile(thDatWrapper *datw, bool ignoreAnUint)
QBuffer *buf=new QBuffer(arr,nullptr);
buf->open(QIODevice::ReadOnly);
LoadFile(buf,ignoreAnUint);
//TODO: load musiccmt.txt
delete buf;
delete arr;
LoadComment(datw);
Expand Down
6 changes: 6 additions & 0 deletions thdatwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ thDatWrapper::thDatWrapper(const char *datpath,unsigned ver)
datf=thtk_io_open_file(datpath,"rb",&e);
thtk_error_free(&e);
dat=thdat_open(ver,datf,&e);
if(!dat)
//just try the latest supported version instead
{
thtk_error_free(&e);
dat=thdat_open(16,datf,&e);
}
thtk_error_free(&e);
}
ssize_t thDatWrapper::getFileSize(const char *path)
Expand Down

0 comments on commit c07d8e7

Please sign in to comment.