mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-10 23:24:06 +02:00
This commit is contained in:
@@ -735,7 +735,7 @@ int main(int argc, char** argv) {
|
||||
int main(int argc, char** argv) {
|
||||
#else
|
||||
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
|
||||
int argc = lpCmdLine ? 2 : 1;
|
||||
int argc = (lpCmdLine && strlen(lpCmdLine)) ? 2 : 1;
|
||||
char *argv[] = { "", lpCmdLine };
|
||||
#endif
|
||||
cacheDir[0] = saveDir[0] = contentDir[0] = 0;
|
||||
|
11
src/utils.h
11
src/utils.h
@@ -26,11 +26,14 @@
|
||||
#define ASSERT(expr)
|
||||
#define ASSERTV(expr) (expr) ? 1 : 0
|
||||
|
||||
#ifdef _OS_LINUX
|
||||
#define LOG(...) printf(__VA_ARGS__); fflush(stdout)
|
||||
#ifdef PROFILE
|
||||
#ifdef _OS_LINUX
|
||||
#define LOG(...) printf(__VA_ARGS__); fflush(stdout)
|
||||
#else
|
||||
#define LOG(...) printf(__VA_ARGS__)
|
||||
#endif
|
||||
#else
|
||||
#define LOG(...) printf(__VA_ARGS__)
|
||||
// #define LOG(...) 0
|
||||
#define LOG(...) 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@@ -863,6 +863,9 @@ struct Video {
|
||||
bool nextChunk() {
|
||||
OS_LOCK(Sound::lock);
|
||||
|
||||
if (videoChunks[videoChunksCount % MAX_CHUNKS].size > 0)
|
||||
return false;
|
||||
|
||||
if (stream->pos >= stream->size)
|
||||
return false;
|
||||
|
||||
@@ -1059,6 +1062,8 @@ struct Video {
|
||||
}
|
||||
}
|
||||
|
||||
chunk->size = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1072,6 +1077,7 @@ struct Video {
|
||||
curAudioChunk++;
|
||||
while (curAudioChunk >= audioChunksCount) {
|
||||
if (!nextChunk()) {
|
||||
curAudioChunk--;
|
||||
memset(frames, 0, count * sizeof(Sound::Frame));
|
||||
return count;
|
||||
}
|
||||
|
Reference in New Issue
Block a user