ggwave-gui : add interface_openFile

This commit is contained in:
Georgi Gerganov
2021-01-02 08:56:03 +02:00
parent b96fdbfa20
commit 2fe0e107f1
4 changed files with 55 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
#include "interface.h"
int g_lastShareId = 0;
int g_lastOpenId = 0;
int g_lastDeleteId = 0;
int g_lastReceivedId = 0;
int g_frameCount = 0;
@@ -18,6 +19,18 @@ void updateMain() {
g_lastShareId = curShareId;
}
auto curOpenId = getOpenId();
if (curOpenId != g_lastOpenId) {
auto openInfo = getOpenInfo();
interface_openFile(
openInfo.uri.data(),
openInfo.filename.data(),
openInfo.dataBuffer,
openInfo.dataSize);
g_lastOpenId = curOpenId;
}
auto curDeleteId = getDeleteId();
if (curDeleteId != g_lastDeleteId) {
auto deleteInfo = getDeleteInfo();