mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
moved back update cycle constant looping override for static sources
--HG-- branch : minor
This commit is contained in:
@@ -712,9 +712,14 @@ static int stbi__sse2_available()
|
|||||||
|
|
||||||
static int stbi__sse2_available()
|
static int stbi__sse2_available()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 // GCC 4.8 or later
|
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 // GCC 4.8 or later
|
||||||
// GCC 4.8+ has a nice way to do this
|
// GCC 4.8+ has a nice way to do this
|
||||||
return __builtin_cpu_supports("sse2");
|
return __builtin_cpu_supports("sse2");
|
||||||
|
*/
|
||||||
|
#if defined(STBI__X64_TARGET)
|
||||||
|
// GCC 5 has this function buggy for a moment, but an x64 CPU can be assumed to have SSE2 anyway
|
||||||
|
return 1;
|
||||||
#else
|
#else
|
||||||
// portable way to do this, preferably without using GCC inline ASM?
|
// portable way to do this, preferably without using GCC inline ASM?
|
||||||
// just bail for now.
|
// just bail for now.
|
||||||
|
|||||||
@@ -280,7 +280,12 @@ bool Source::update()
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case TYPE_STATIC:
|
case TYPE_STATIC:
|
||||||
|
{
|
||||||
|
// Looping mode could have changed.
|
||||||
|
- // FIXME: make looping mode change atomically so this is not needed
|
||||||
|
alSourcei(source, AL_LOOPING, isLooping() ? AL_TRUE : AL_FALSE);
|
||||||
return !isFinished();
|
return !isFinished();
|
||||||
|
}
|
||||||
case TYPE_STREAM:
|
case TYPE_STREAM:
|
||||||
if (!isFinished())
|
if (!isFinished())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user