BUG :Accès au FS fait planter la capture
This commit is contained in:
parent
dd61d062a8
commit
aa62bffe1f
|
@ -6,12 +6,13 @@ include(Fxconv)
|
|||
find_package(Gint 2.9 REQUIRED)
|
||||
|
||||
set(SOURCES
|
||||
src/main.cpp
|
||||
#src/main.cpp
|
||||
src/tests.cpp
|
||||
src/sudoSolver.cpp
|
||||
src/shared/bFile.cpp
|
||||
src/shared/keyboard.cpp
|
||||
src/shared/menuBar.cpp
|
||||
#src/shared/scrCapture.cpp
|
||||
src/shared/scrCapture.cpp
|
||||
src/position.cpp
|
||||
src/element.cpp
|
||||
src/tinySquare.cpp
|
||||
|
@ -30,7 +31,7 @@ set(ASSETS_cg
|
|||
fxconv_declare_assets(${ASSETS} ${ASSETS_cg} WITH_METADATA)
|
||||
|
||||
add_executable(sudoSolver ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
|
||||
target_compile_options(sudoSolver PRIVATE -Wall -Wextra -Os -D=DEST_CASIO_CALC -D=NO_CAPTURE)
|
||||
target_compile_options(sudoSolver PRIVATE -Wall -Wextra -Os -D=DEST_CASIO_CALC -D=NO_CAPTUREU)
|
||||
target_link_libraries(sudoSolver Gint::Gint)
|
||||
|
||||
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
|
||||
|
|
|
@ -22,7 +22,7 @@ int main(void){
|
|||
// Enter app. main loop
|
||||
sSolver.run();
|
||||
|
||||
gint_setrestart(1);
|
||||
gint_setrestart(0);
|
||||
//gint_osmenu();
|
||||
|
||||
return 1;
|
||||
|
|
|
@ -116,7 +116,7 @@ int bFile::size(){
|
|||
//
|
||||
// @return : file opened ?
|
||||
//
|
||||
bool bFile::open(const FONTCHARACTER filename, int access){
|
||||
bool bFile::open(FONTCHARACTER const filename, int access){
|
||||
if (access && !isOpen()){
|
||||
#ifdef DEST_CASIO_CALC
|
||||
fd_ = gint_world_switch(GINT_CALL(BFile_Open, filename, access));
|
||||
|
@ -209,7 +209,7 @@ bool bFile::create(const FONTCHARACTER fname, int type, int *size){
|
|||
// @return : file or folder successfully created
|
||||
// - and openend for file ?
|
||||
//
|
||||
bool bFile::createEx(const FONTCHARACTER fname, int type,
|
||||
bool bFile::createEx(const FONTCHARACTER fname, int type,
|
||||
int *size, int access){
|
||||
if (BFile_Folder == type){
|
||||
return create(fname, BFile_Folder, size);
|
||||
|
@ -343,7 +343,7 @@ bool bFile::rename(const FONTCHARACTER oldPath, const FONTCHARACTER newPath){
|
|||
if (buffer && read(buffer, size, 0)){
|
||||
// Create a new file with oldPath content
|
||||
bFile newFile();
|
||||
if (newFile.createEx(newPath, BFile_File,
|
||||
if (newFile.createEx(newPath, BFile_File,
|
||||
&size, BFile_WriteOnly)){
|
||||
newFile.write(buffer, size);
|
||||
newFile.close();
|
||||
|
|
|
@ -81,7 +81,7 @@ struct BFile_FileInfo
|
|||
|
||||
#endif // #ifndef DEST_CASIO_CALC
|
||||
|
||||
// Max lengthof a path in "FONTCHARACTER"
|
||||
// Max lengthof a path in "FONTCHARACTER"
|
||||
//
|
||||
#define BFILE_MAX_PATH 127
|
||||
|
||||
|
@ -147,7 +147,7 @@ public:
|
|||
//
|
||||
// @return : file opened ?
|
||||
//
|
||||
bool open(const FONTCHARACTER filename, int access);
|
||||
bool open(FONTCHARACTER const filename, int access);
|
||||
|
||||
// create() : Create a file or a folder
|
||||
//
|
||||
|
@ -174,7 +174,7 @@ public:
|
|||
// @return : file or folder successfully created
|
||||
// - and openend for file ?
|
||||
//
|
||||
bool createEx(const FONTCHARACTER fname, int type,
|
||||
bool createEx(const FONTCHARACTER fname, int type,
|
||||
int *size, int access);
|
||||
|
||||
// write() : Write data in the current file
|
||||
|
@ -203,7 +203,7 @@ public:
|
|||
//
|
||||
// @return : file successfully renamed ?
|
||||
//
|
||||
bool rename(const FONTCHARACTER oldPath,
|
||||
bool rename(const FONTCHARACTER oldPath,
|
||||
const FONTCHARACTER newPath);
|
||||
|
||||
// remove() : Remove a file
|
||||
|
@ -242,7 +242,7 @@ public:
|
|||
//
|
||||
// @return : true if ok
|
||||
//
|
||||
bool findNext(SEARCHHANDLE sHandle, FONTCHARACTER foundFile,
|
||||
bool findNext(SEARCHHANDLE sHandle, FONTCHARACTER foundFile,
|
||||
struct BFile_FileInfo *fileInfo);
|
||||
|
||||
// findClose() : Close a search handle
|
||||
|
|
|
@ -12,6 +12,22 @@
|
|||
#include <gint/usb.h>
|
||||
#include <gint/usb-ff-bulk.h>
|
||||
|
||||
// Construction
|
||||
//
|
||||
scrCapture::scrCapture(){
|
||||
set_ = false;
|
||||
}
|
||||
|
||||
// Destruction
|
||||
scrCapture::~scrCapture(){
|
||||
remove();
|
||||
}
|
||||
|
||||
// Already installed ?
|
||||
bool scrCapture::isSet(){
|
||||
return set_;
|
||||
}
|
||||
|
||||
// Install
|
||||
//
|
||||
bool scrCapture::install(){
|
||||
|
@ -28,7 +44,7 @@ bool scrCapture::install(){
|
|||
|
||||
// Set the hook
|
||||
dupdate_set_hook(GINT_CALL(usb_fxlink_videocapture, 0));
|
||||
return true;
|
||||
return (set_ = true);
|
||||
}
|
||||
|
||||
// Remove
|
||||
|
|
|
@ -18,25 +18,25 @@ extern "C" {
|
|||
class scrCapture{
|
||||
public:
|
||||
// Construction
|
||||
scrCapture(){
|
||||
set_ = false;
|
||||
}
|
||||
scrCapture();
|
||||
|
||||
// Destruction
|
||||
~scrCapture(){
|
||||
remove();
|
||||
}
|
||||
~scrCapture();
|
||||
|
||||
// Already installed ?
|
||||
bool isSet(){
|
||||
return set_;
|
||||
}
|
||||
bool isSet();
|
||||
|
||||
// Install
|
||||
bool install();
|
||||
bool set(){
|
||||
return install();
|
||||
}
|
||||
|
||||
// Remove
|
||||
void remove();
|
||||
void unset(){
|
||||
return remove();
|
||||
}
|
||||
|
||||
private:
|
||||
// Members
|
||||
|
|
Loading…
Reference in a new issue