mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-02-08 01:58:02 +08:00
ggwave-gui : add interface_openFile
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user