@@ -123,7 +123,6 @@ static RageSurface *RageSurface_Load_PNG( RageFile *f, const char *fn, char erro
|
|||||||
CHECKPOINT_M("Header only png about to be processed.");
|
CHECKPOINT_M("Header only png about to be processed.");
|
||||||
img = CreateSurfaceFrom( width, height, 32, 0, 0, 0, 0, nullptr, width*4 );
|
img = CreateSurfaceFrom( width, height, 32, 0, 0, 0, 0, nullptr, width*4 );
|
||||||
png_destroy_read_struct( &png, &info_ptr, nullptr );
|
png_destroy_read_struct( &png, &info_ptr, nullptr );
|
||||||
|
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,6 +254,11 @@ static RageSurface *RageSurface_Load_PNG( RageFile *f, const char *fn, char erro
|
|||||||
png_read_end( png, info_ptr );
|
png_read_end( png, info_ptr );
|
||||||
png_destroy_read_struct( &png, &info_ptr, nullptr );
|
png_destroy_read_struct( &png, &info_ptr, nullptr );
|
||||||
|
|
||||||
|
if(row_pointers != nullptr)
|
||||||
|
{
|
||||||
|
delete[] row_pointers;
|
||||||
|
}
|
||||||
|
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ LinuxInputManager::LinuxInputManager()
|
|||||||
// Sort devices for more consistent numbering.
|
// Sort devices for more consistent numbering.
|
||||||
std::sort(m_vsPendingEventDevices.begin(), m_vsPendingEventDevices.end(), cmpDevices);
|
std::sort(m_vsPendingEventDevices.begin(), m_vsPendingEventDevices.end(), cmpDevices);
|
||||||
std::sort(m_vsPendingJoystickDevices.begin(), m_vsPendingJoystickDevices.end(), cmpDevices);
|
std::sort(m_vsPendingJoystickDevices.begin(), m_vsPendingJoystickDevices.end(), cmpDevices);
|
||||||
|
|
||||||
|
closedir(sysClassInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LinuxInputManager::InitDriver(InputHandler_Linux_Event* driver)
|
void LinuxInputManager::InitDriver(InputHandler_Linux_Event* driver)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "SignalHandler.h"
|
#include "SignalHandler.h"
|
||||||
#include "GetSysInfo.h"
|
#include "GetSysInfo.h"
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#if defined(HAVE_LIBPTHREAD)
|
#if defined(HAVE_LIBPTHREAD)
|
||||||
#include "archutils/Common/PthreadHelpers.h"
|
#include "archutils/Common/PthreadHelpers.h"
|
||||||
@@ -31,7 +32,7 @@ static int find_stack_direction2( char *p ) NOINLINE;
|
|||||||
static int find_stack_direction() NOINLINE;
|
static int find_stack_direction() NOINLINE;
|
||||||
|
|
||||||
static vector<SignalHandler::handler> handlers;
|
static vector<SignalHandler::handler> handlers;
|
||||||
SaveSignals *saved_sigs;
|
unique_ptr<SaveSignals> saved_sigs;
|
||||||
|
|
||||||
static int signals[] =
|
static int signals[] =
|
||||||
{
|
{
|
||||||
@@ -143,10 +144,10 @@ static void *CreateStack( int size )
|
|||||||
/* Hook up events to fatal signals, so we can clean up if we're killed. */
|
/* Hook up events to fatal signals, so we can clean up if we're killed. */
|
||||||
void SignalHandler::OnClose( handler h )
|
void SignalHandler::OnClose( handler h )
|
||||||
{
|
{
|
||||||
if( saved_sigs == nullptr )
|
//if the unique_ptr has not been set, then enter.
|
||||||
|
if( !saved_sigs )
|
||||||
{
|
{
|
||||||
saved_sigs = new SaveSignals;
|
saved_sigs.reset(new SaveSignals());
|
||||||
|
|
||||||
bool bUseAltSigStack = true;
|
bool bUseAltSigStack = true;
|
||||||
|
|
||||||
#if defined(LINUX)
|
#if defined(LINUX)
|
||||||
|
|||||||
Reference in New Issue
Block a user