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