diff options
| author | Mariano Javier Suligoy | 2015-08-09 16:33:02 -0300 |
|---|---|---|
| committer | Mariano Javier Suligoy | 2015-08-09 16:33:02 -0300 |
| commit | 3a83337420c3e6c7e5f3a52cee49aa2eb17cab2d (patch) | |
| tree | 7560fb0b3caf599e7181e17edce12616a58cdf73 /drivers | |
| parent | c88038228ae9b5c53d5d7ff3f1d99ac0adbc30eb (diff) | |
| parent | c2e2f2e0aebf6342e6f18ae5d67b6a825590675a (diff) | |
| download | godot-3a83337420c3e6c7e5f3a52cee49aa2eb17cab2d.tar.gz godot-3a83337420c3e6c7e5f3a52cee49aa2eb17cab2d.tar.zst godot-3a83337420c3e6c7e5f3a52cee49aa2eb17cab2d.zip | |
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/png/SCsub | 5 | ||||
| -rw-r--r-- | drivers/unix/os_unix.cpp | 8 | ||||
| -rw-r--r-- | drivers/unix/os_unix.h | 1 | ||||
| -rw-r--r-- | drivers/vorbis/audio_stream_ogg_vorbis.cpp | 2 |
4 files changed, 14 insertions, 2 deletions
diff --git a/drivers/png/SCsub b/drivers/png/SCsub index c3919567b..7b937d4df 100644 --- a/drivers/png/SCsub +++ b/drivers/png/SCsub @@ -27,7 +27,10 @@ if ("neon_enabled" in env and env["neon_enabled"]): if "S_compiler" in env: env_neon['CC'] = env['S_compiler'] env_neon.Append(CPPFLAGS=["-DPNG_ARM_NEON"]) - png_sources.append(env_neon.Object("#drivers/png/filter_neon.S")) + import os + # Currently .ASM filter_neon.S does not compile on NT. + if (os.name!="nt"): + png_sources.append(env_neon.Object("#drivers/png/filter_neon.S")) env.drivers_sources+=png_sources diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index f6d9e0fb4..314e13cee 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -223,6 +223,14 @@ uint64_t OS_Unix::get_unix_time() const { return time(NULL); }; +uint64_t OS_Unix::get_system_time_msec() const { + struct timeval tv_now; + gettimeofday(&tv_now, NULL); + localtime(&tv_now.tv_usec); + uint64_t msec = tv_now.tv_usec/1000; + return msec; +} + OS::Date OS_Unix::get_date(bool utc) const { diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h index 8bb57eda1..2ee610216 100644 --- a/drivers/unix/os_unix.h +++ b/drivers/unix/os_unix.h @@ -93,6 +93,7 @@ public: virtual TimeZoneInfo get_time_zone_info() const; virtual uint64_t get_unix_time() const; + virtual uint64_t get_system_time_msec() const; virtual void delay_usec(uint32_t p_usec) const; virtual uint64_t get_ticks_usec() const; diff --git a/drivers/vorbis/audio_stream_ogg_vorbis.cpp b/drivers/vorbis/audio_stream_ogg_vorbis.cpp index ed292621e..249059e2c 100644 --- a/drivers/vorbis/audio_stream_ogg_vorbis.cpp +++ b/drivers/vorbis/audio_stream_ogg_vorbis.cpp @@ -232,7 +232,7 @@ void AudioStreamOGGVorbis::seek_pos(float p_time) { if (!playing) return; - bool ok = ov_time_seek(&vf,p_time*1000)==0; + bool ok = ov_time_seek(&vf,p_time)==0; ERR_FAIL_COND(!ok); frames_mixed=stream_srate*p_time; } |
