<commit_before>#include "Platform.h"
#include "../Bacon.h"
#include "../BaconInternal.h"

// For Events.h (virtual key codes).  Does not link against Carbon
#include <Carbon/Carbon.h>

#include <tr1/unordered_map>
using namespace std::tr1;

unordered_map<unichar, int> s_CharMap;
unordered_map<int, int> s_VKeyCodeMap;
static void InitKeyMap();

@implementation View

- (id)initWithFrame:(NSRect)frame
{
	InitKeyMap();
	
    self = [super initWithFrame:frame];
    if (self) {
		// Accept mouseMoved events
		NSTrackingArea *trackingArea = [[NSTrackingArea alloc] initWithRect:[self frame]
																	options:NSTrackingMouseMoved | NSTrackingActiveInKeyWindow |
																		NSTrackingInVisibleRect
																	  owner:self
																   userInfo:nil];
		[self addTrackingArea:trackingArea];
		
		NSOpenGLPixelFormat *fmt;
		
		NSOpenGLPixelFormatAttribute attrs[] =
		{
			NSOpenGLPFADoubleBuffer,
			NSOpenGLPFADepthSize, 32,
			0
		};
		
		// Init GL context
		fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes: attrs];
		m_PixelFormat = (CGLPixelFormatObj)[fmt CGLPixelFormatObj];
		g_Context = [[NSOpenGLContext alloc] initWithFormat: fmt shareContext: nil];
		[fmt release];
		[g_Context makeCurrentContext];
		
		Graphics_InitGL();
    }
    
    return self;
}
<commit_msg>Content scale on backing framebuffer<commit_after>#include "Platform.h"
#include "../Bacon.h"
#include "../BaconInternal.h"

// For Events.h (virtual key codes).  Does not link against Carbon
#include <Carbon/Carbon.h>

#include <tr1/unordered_map>
using namespace std::tr1;

unordered_map<unichar, int> s_CharMap;
unordered_map<int, int> s_VKeyCodeMap;
static void InitKeyMap();

@implementation View

- (id)initWithFrame:(NSRect)frame
{
	InitKeyMap();
	
    self = [super initWithFrame:frame];
    if (self) {
		// Accept mouseMoved events
		NSTrackingArea *trackingArea = [[NSTrackingArea alloc] initWithRect:[self frame]
																	options:NSTrackingMouseMoved | NSTrackingActiveInKeyWindow |
																		NSTrackingInVisibleRect
																	  owner:self
																   userInfo:nil];
		[self addTrackingArea:trackingArea];
		
		NSOpenGLPixelFormat *fmt;
		
		NSOpenGLPixelFormatAttribute attrs[] =
		{
			NSOpenGLPFADoubleBuffer,
			NSOpenGLPFADepthSize, 32,
			0
		};
		
		if ([self respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)])
			self.wantsBestResolutionOpenGLSurface = YES;
		
		// Init GL context
		fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes: attrs];
		m_PixelFormat = (CGLPixelFormatObj)[fmt CGLPixelFormatObj];
		g_Context = [[NSOpenGLContext alloc] initWithFormat: fmt shareContext: nil];
		[fmt release];
		[g_Context makeCurrentContext];
		
		Graphics_InitGL();
    }
    
    return self;
}

{'fraction_non_alphanumeric': 0.10263823635706541, 'fraction_numerical': 0.003614022406938923, 'mean_word_length': 3.7560137457044673, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4868890', 'n_tokens_mistral': 1118, 'n_tokens_neox': 887, 'n_words': 189}