Skip to content

Commit 6c4744a

Browse files
committed
Fix Processing_api.h: restore corrupted header, add deltaTime forwarder
1 parent 38851d5 commit 6c4744a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Processing_api.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
/
2-
inline float deltaTime() { return ::Processing::PApplet::g_papplet ? ::Processing::PApplet::g_papplet->deltaTime : 0.016f; }
3-
/ Processing_api.h
1+
// Processing_api.h
42
// Included in Sketch_run.cpp to make Processing API available to user-defined
53
// classes inside sketches (which don't inherit from PApplet).
64
#pragma once
@@ -13,6 +11,8 @@ inline float deltaTime() { return ::Processing::PApplet::g_papplet ? ::Process
1311

1412
// ── Math (static, no instance needed) ────────────────────────────────────────
1513
inline float sq(float x) { return PApplet::sq(x); }
14+
inline float deltaTime() { return ::Processing::PApplet::g_papplet ? ::Processing::PApplet::g_papplet->deltaTime : 0.016f; }
15+
1616
inline float lerp(float a,float b,float t) { return PApplet::lerp(a,b,t); }
1717
inline bool* getKeysDown() { return PApplet::g_papplet ? PApplet::g_papplet->keysDown : nullptr; }
1818
inline bool isKeyDown(int keyCode) {

0 commit comments

Comments
 (0)