mirror of https://github.com/libAthena/athena.git
Fix fno-exceptions
This commit is contained in:
parent
b9d79a9581
commit
1b67cce607
|
@ -1,11 +1,15 @@
|
||||||
|
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(Example)
|
project(Example)
|
||||||
|
endif()
|
||||||
|
|
||||||
include_directories(${ATHENA_INCLUDE_DIR})
|
include_directories(${ATHENA_INCLUDE_DIR})
|
||||||
add_executable(Example
|
add_executable(Example
|
||||||
main.cpp)
|
main.cpp)
|
||||||
|
|
||||||
if(GEKKO)
|
if(GEKKO)
|
||||||
|
include_directories(${LIBOGCDIR}/include)
|
||||||
|
link_directories(${LIGOGCDIR}/lib/wii)
|
||||||
target_link_libraries(Example AthenaCore z wiiuse bte ogc m)
|
target_link_libraries(Example AthenaCore z wiiuse bte ogc m)
|
||||||
else()
|
else()
|
||||||
#TODO: add normal link libraries
|
#TODO: add normal link libraries
|
||||||
|
|
|
@ -172,24 +172,18 @@ bool FileInfo::touch() const
|
||||||
#elif (defined(HW_RVL) || defined(HW_DOL)) && defined(GEKKO)
|
#elif (defined(HW_RVL) || defined(HW_DOL)) && defined(GEKKO)
|
||||||
// Generic portable version, not extremely reliable but does work
|
// Generic portable version, not extremely reliable but does work
|
||||||
atUint64 val = 0xCDCDCDCDCD;
|
atUint64 val = 0xCDCDCDCDCD;
|
||||||
try
|
|
||||||
{
|
{
|
||||||
Athena::io::FileReader reader(m_path.c_str());
|
Athena::io::FileReader reader(m_path.c_str());
|
||||||
val = reader.readUint64();
|
if (reader.isOpen())
|
||||||
}
|
val = reader.readUint64();
|
||||||
catch(...)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
Athena::io::FileWriter writer(m_path, false);
|
Athena::io::FileWriter writer(m_path, false);
|
||||||
if (val != 0xCDCDCDCDCD)
|
if (val != 0xCDCDCDCDCD && writer.isOpen())
|
||||||
writer.writeUint64(val);
|
writer.writeUint64(val);
|
||||||
}
|
else if (!writer.isOpen())
|
||||||
catch(...)
|
return false;
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue