Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding input callback for quickernes #4200

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SergioMartin86
Copy link
Contributor

@SergioMartin86 SergioMartin86 commented Jan 28, 2025

On request by Alyosha, added input poll callback for QuickerNES

For context, see: https://tasvideos.org/Forum/Posts/534219

LUA script for testing:

function poll_handler()
    print('hello')
end

event.oninputpoll(poll_handler) -- registers callback

-- This template lives at `.../Lua/.template.lua`.
while true do
	-- Code here will run once when the script is loaded, then after each emulated frame.
	emu.frameadvance();
end

Check if completed:

@SergioMartin86 SergioMartin86 marked this pull request as ready for review January 28, 2025 18:12
@@ -207,7 +207,11 @@ public abstract class LibQuickNES
[BizImport(CallingConvention.Cdecl)]
public abstract void qn_set_tracecb(IntPtr e, TraceCallback cb);

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void input_cb();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this include the index? See #3233.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants