npapi-vlc | branch: master | Felix Paul Kühne <[email protected]> | Mon Jan 27 20:05:06 2014 +0100| [1148de7a7c7e4f7161be951b0d8eb7f1fdac6358] | committer: Felix Paul Kühne
mac: expose used architecture in debug screen > http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=1148de7a7c7e4f7161be951b0d8eb7f1fdac6358 --- npapi/vlcplugin_mac.mm | 13 +++++++++++++ npapi/vlcwindowless_mac.cpp | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/npapi/vlcplugin_mac.mm b/npapi/vlcplugin_mac.mm index d44aff8..4aa090e 100644 --- a/npapi/vlcplugin_mac.mm +++ b/npapi/vlcplugin_mac.mm @@ -490,6 +490,19 @@ bool VlcPluginMac::handle_event(void *event) CTLineDraw(textLine, cgContext); CFRelease(textLine); CFRelease(attRef); + + // expose arch +#ifdef __x86_64__ + attRef = CFAttributedStringCreate(kCFAllocatorDefault, CFSTR("Intel, 64-bit"), stylesDict); +#else + attRef = CFAttributedStringCreate(kCFAllocatorDefault, CFSTR("Intel, 32-bit"), stylesDict); +#endif + textLine = CTLineCreateWithAttributedString(attRef); + textRect = CTLineGetImageBounds(textLine, cgContext); + CGContextSetTextPosition(cgContext, ((windowWidth - textRect.size.width) / 2), ((windowHeight - textRect.size.height) / 2) - 65.); + CTLineDraw(textLine, cgContext); + CFRelease(textLine); + CFRelease(attRef); CFRelease(stylesDict); #else // draw a black rect diff --git a/npapi/vlcwindowless_mac.cpp b/npapi/vlcwindowless_mac.cpp index 26da75a..93c2772 100644 --- a/npapi/vlcwindowless_mac.cpp +++ b/npapi/vlcwindowless_mac.cpp @@ -104,6 +104,19 @@ void VlcWindowlessMac::drawNoPlayback(CGContextRef cgContext) CTLineDraw(textLine, cgContext); CFRelease(textLine); CFRelease(attRef); + + // expose arch +#ifdef __x86_64__ + attRef = CFAttributedStringCreate(kCFAllocatorDefault, CFSTR("Intel, 64-bit"), stylesDict); +#else + attRef = CFAttributedStringCreate(kCFAllocatorDefault, CFSTR("Intel, 32-bit"), stylesDict); +#endif + textLine = CTLineCreateWithAttributedString(attRef); + textRect = CTLineGetImageBounds(textLine, cgContext); + CGContextSetTextPosition(cgContext, ((windowWidth - textRect.size.width) / 2), ((windowHeight - textRect.size.height) / 2) - 65.); + CTLineDraw(textLine, cgContext); + CFRelease(textLine); + CFRelease(attRef); CFRelease(stylesDict); #else // draw a black rect _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
