mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-03 21:41:19 +12:00
Add initial ntag and nfc implementation
This commit is contained in:
parent
84e78088fb
commit
1c6b209692
21 changed files with 2927 additions and 47 deletions
|
@ -12,7 +12,7 @@
|
|||
#include "audio/audioDebuggerWindow.h"
|
||||
#include "gui/canvas/OpenGLCanvas.h"
|
||||
#include "gui/canvas/VulkanCanvas.h"
|
||||
#include "Cafe/OS/libs/nn_nfp/nn_nfp.h"
|
||||
#include "Cafe/OS/libs/nfc/nfc.h"
|
||||
#include "Cafe/OS/libs/swkbd/swkbd.h"
|
||||
#include "gui/debugger/DebuggerWindow2.h"
|
||||
#include "util/helpers/helpers.h"
|
||||
|
@ -261,7 +261,7 @@ public:
|
|||
return false;
|
||||
uint32 nfcError;
|
||||
std::string path = filenames[0].utf8_string();
|
||||
if (nnNfp_touchNfcTagFromFile(_utf8ToPath(path), &nfcError))
|
||||
if (nfc::TouchTagFromFile(_utf8ToPath(path), &nfcError))
|
||||
{
|
||||
GetConfig().AddRecentNfcFile(path);
|
||||
m_window->UpdateNFCMenu();
|
||||
|
@ -749,7 +749,7 @@ void MainWindow::OnNFCMenu(wxCommandEvent& event)
|
|||
return;
|
||||
wxString wxStrFilePath = openFileDialog.GetPath();
|
||||
uint32 nfcError;
|
||||
if (nnNfp_touchNfcTagFromFile(_utf8ToPath(wxStrFilePath.utf8_string()), &nfcError) == false)
|
||||
if (nfc::TouchTagFromFile(_utf8ToPath(wxStrFilePath.utf8_string()), &nfcError) == false)
|
||||
{
|
||||
if (nfcError == NFC_ERROR_NO_ACCESS)
|
||||
wxMessageBox(_("Cannot open file"));
|
||||
|
@ -772,7 +772,7 @@ void MainWindow::OnNFCMenu(wxCommandEvent& event)
|
|||
if (!path.empty())
|
||||
{
|
||||
uint32 nfcError = 0;
|
||||
if (nnNfp_touchNfcTagFromFile(_utf8ToPath(path), &nfcError) == false)
|
||||
if (nfc::TouchTagFromFile(_utf8ToPath(path), &nfcError) == false)
|
||||
{
|
||||
if (nfcError == NFC_ERROR_NO_ACCESS)
|
||||
wxMessageBox(_("Cannot open file"));
|
||||
|
@ -2210,6 +2210,8 @@ void MainWindow::RecreateMenu()
|
|||
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::Socket), _("&Socket API"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::Socket));
|
||||
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::Save), _("&Save API"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::Save));
|
||||
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::H264), _("&H264 API"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::H264));
|
||||
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::NFC), _("&NFC API"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::NFC));
|
||||
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::NTAG), _("&NTAG API"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::NTAG));
|
||||
debugLoggingMenu->AppendSeparator();
|
||||
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::Patches), _("&Graphic pack patches"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::Patches));
|
||||
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::TextureCache), _("&Texture cache warnings"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::TextureCache));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue