Skip to content

Commit dc61878

Browse files
committed
method also for const char*
1 parent 53e06b3 commit dc61878

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

include/WebARKit/WebARKitLog.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ void webarkitLOGi(char* message, float * format);
1111

1212
void webarkitLOGi(char* message, char * format);
1313

14+
void webarkitLOGi(char* message, const char * format);
15+
1416
void webarkitLOGi(char* message, int format);
1517

1618

lib/SRC/WebARKit/WebARKitLog.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,21 @@ void webarkitLOGi(char* message, char * format) {
5858
);
5959
}
6060

61+
void webarkitLOGi(char* message, const char * format) {
62+
EM_ASM ({
63+
var message = UTF8ToString($0);
64+
var info = UTF8ToString($1);
65+
var style = UTF8ToString($2);
66+
var format = UTF8ToString($3);
67+
console.log(info + message, style, format);
68+
},
69+
message,
70+
WARKTinfo,
71+
WARKTstyle,
72+
format
73+
);
74+
}
75+
6176
void webarkitLOGi(char* message, int format) {
6277
EM_ASM ({
6378
var message = UTF8ToString($0);

0 commit comments

Comments
 (0)