mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-15 03:08:52 +01:00
Clean up unused variables. Added -Wall compiler option for linux.
This commit is contained in:
parent
9fa29078b1
commit
e9b329bc8c
@ -175,7 +175,6 @@ add_executable(RetroFE ${RETROFE_SOURCES} ${RETROFE_HEADERS})
|
|||||||
target_link_libraries(RetroFE ${RETROFE_LIBRARIES})
|
target_link_libraries(RetroFE ${RETROFE_LIBRARIES})
|
||||||
set_target_properties(RetroFE PROPERTIES LINKER_LANGUAGE CXX)
|
set_target_properties(RetroFE PROPERTIES LINKER_LANGUAGE CXX)
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mwindows")
|
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -mwindows")
|
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -mwindows")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -191,4 +190,8 @@ if(MSVC)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /WX")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /WX")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP /WX")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP /WX")
|
||||||
set_target_properties(RetroFE PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
|
set_target_properties(RetroFE PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
|
||||||
|
else()
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@ -72,7 +72,6 @@ CollectionInfo *CollectionInfoBuilder::BuildCollection(std::string name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CollectionInfo *collection = new CollectionInfo(name, listItemsPath, extensions, metadataType, metadataPath);
|
CollectionInfo *collection = new CollectionInfo(name, listItemsPath, extensions, metadataType, metadataPath);
|
||||||
std::vector<Item *> *list = collection->GetItems();
|
|
||||||
|
|
||||||
ImportDirectory(collection);
|
ImportDirectory(collection);
|
||||||
|
|
||||||
@ -80,7 +79,7 @@ CollectionInfo *CollectionInfoBuilder::BuildCollection(std::string name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CollectionInfoBuilder::ImportBasicList(CollectionInfo *info, std::string file, std::map<std::string, Item *> &list)
|
bool CollectionInfoBuilder::ImportBasicList(CollectionInfo * /*info*/, std::string file, std::map<std::string, Item *> &list)
|
||||||
{
|
{
|
||||||
std::ifstream includeStream(file.c_str());
|
std::ifstream includeStream(file.c_str());
|
||||||
|
|
||||||
@ -116,7 +115,6 @@ bool CollectionInfoBuilder::ImportDirectory(CollectionInfo *info)
|
|||||||
std::string path = info->GetListPath();
|
std::string path = info->GetListPath();
|
||||||
std::map<std::string, Item *> includeFilter;
|
std::map<std::string, Item *> includeFilter;
|
||||||
std::map<std::string, Item *> excludeFilter;
|
std::map<std::string, Item *> excludeFilter;
|
||||||
bool retVal = true;
|
|
||||||
std::string includeFile = Configuration::GetAbsolutePath() + "/Collections/" + info->GetName() + "/Include.txt";
|
std::string includeFile = Configuration::GetAbsolutePath() + "/Collections/" + info->GetName() + "/Include.txt";
|
||||||
std::string excludeFile = Configuration::GetAbsolutePath() + "/Collections/" + info->GetName() + "/Exclude.txt";
|
std::string excludeFile = Configuration::GetAbsolutePath() + "/Collections/" + info->GetName() + "/Exclude.txt";
|
||||||
std::string launcher;
|
std::string launcher;
|
||||||
|
|||||||
@ -467,7 +467,6 @@ void ScrollingList::TriggerMenuExitEvent()
|
|||||||
|
|
||||||
void ScrollingList::Update(float dt)
|
void ScrollingList::Update(float dt)
|
||||||
{
|
{
|
||||||
float scrollPeriod = 0;
|
|
||||||
bool initializePoints = false;
|
bool initializePoints = false;
|
||||||
Component::Update(dt);
|
Component::Update(dt);
|
||||||
|
|
||||||
|
|||||||
@ -100,6 +100,6 @@ void VideoComponent::Draw()
|
|||||||
|
|
||||||
if(texture)
|
if(texture)
|
||||||
{
|
{
|
||||||
SDL::RenderCopy(texture, static_cast<int>(info->GetAlpha() * 255), NULL, &rect, info->GetAngle());
|
SDL::RenderCopy(texture, static_cast<int>(info->GetAlpha() * 255), NULL, &rect, static_cast<int>(info->GetAngle()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
static bool ImportConfiguration(Configuration *c);
|
static bool ImportConfiguration(Configuration *c);
|
||||||
static bool StartLogging();
|
static bool StartLogging();
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int /* argc */, char ** /* argv */)
|
||||||
{
|
{
|
||||||
|
|
||||||
Configuration::Initialize();
|
Configuration::Initialize();
|
||||||
|
|||||||
@ -71,7 +71,6 @@ void RetroFE::Render()
|
|||||||
|
|
||||||
int RetroFE::Initialize(void *context)
|
int RetroFE::Initialize(void *context)
|
||||||
{
|
{
|
||||||
int retVal = 0;
|
|
||||||
RetroFE *instance = static_cast<RetroFE *>(context);
|
RetroFE *instance = static_cast<RetroFE *>(context);
|
||||||
|
|
||||||
Logger::Write(Logger::ZONE_INFO, "RetroFE", "Initializing");
|
Logger::Write(Logger::ZONE_INFO, "RetroFE", "Initializing");
|
||||||
@ -150,8 +149,6 @@ bool RetroFE::DeInitialize()
|
|||||||
bool retVal = true;
|
bool retVal = true;
|
||||||
FreeGraphicsMemory();
|
FreeGraphicsMemory();
|
||||||
|
|
||||||
bool videoEnable = true;
|
|
||||||
|
|
||||||
if(CurrentPage)
|
if(CurrentPage)
|
||||||
{
|
{
|
||||||
delete CurrentPage;
|
delete CurrentPage;
|
||||||
@ -201,8 +198,6 @@ void RetroFE::Run()
|
|||||||
int attractModeTime = 0;
|
int attractModeTime = 0;
|
||||||
std::string firstCollection = "Main";
|
std::string firstCollection = "Main";
|
||||||
bool running = true;
|
bool running = true;
|
||||||
Item *nextPageItem = NULL;
|
|
||||||
bool adminMode = false;
|
|
||||||
RETROFE_STATE state = RETROFE_NEW;
|
RETROFE_STATE state = RETROFE_NEW;
|
||||||
|
|
||||||
Config.GetProperty("attractModeTime", attractModeTime);
|
Config.GetProperty("attractModeTime", attractModeTime);
|
||||||
|
|||||||
@ -33,7 +33,7 @@ bool GStreamerVideo::Initialized = false;
|
|||||||
//todo: this started out as sandbox code. This class needs to be refactored
|
//todo: this started out as sandbox code. This class needs to be refactored
|
||||||
|
|
||||||
// MUST match video size
|
// MUST match video size
|
||||||
gboolean GStreamerVideo::BusCallback(GstBus *bus, GstMessage *msg, gpointer data)
|
gboolean GStreamerVideo::BusCallback(GstBus * /* bus */, GstMessage * /* msg */, gpointer /* data */)
|
||||||
{
|
{
|
||||||
// this callback only needs to be defined so we can loop the video once it completes
|
// this callback only needs to be defined so we can loop the video once it completes
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -85,7 +85,7 @@ SDL_Texture *GStreamerVideo::GetTexture() const
|
|||||||
return Texture;
|
return Texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GStreamerVideo::ProcessNewBuffer (GstElement *fakesink, GstBuffer *buf, GstPad *new_pad, gpointer userdata)
|
void GStreamerVideo::ProcessNewBuffer (GstElement * /* fakesink */, GstBuffer *buf, GstPad *new_pad, gpointer userdata)
|
||||||
{
|
{
|
||||||
GStreamerVideo *video = (GStreamerVideo *)userdata;
|
GStreamerVideo *video = (GStreamerVideo *)userdata;
|
||||||
GstMapInfo map;
|
GstMapInfo map;
|
||||||
@ -345,7 +345,7 @@ void GStreamerVideo::Draw()
|
|||||||
FrameReady = false;
|
FrameReady = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GStreamerVideo::Update(float dt)
|
void GStreamerVideo::Update(float /* dt */)
|
||||||
{
|
{
|
||||||
SDL_LockMutex(SDL::GetMutex());
|
SDL_LockMutex(SDL::GetMutex());
|
||||||
if(!Texture && Width != 0 && Height != 0)
|
if(!Texture && Width != 0 && Height != 0)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user