<commit_before>#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <SDL.h>

#include "screen.h"
#include "shifter.h"
#include "debug/display.h"
#include "diag.h"

struct monitor {
  int width, height, columns, lines;
  int crop_offset_x, crop_offset_y;
  int crop_width, crop_height;
};

static int disable = 0;
static SDL_Surface *screen;
static SDL_Texture *texture = NULL;
static SDL_Window *window;
static SDL_Renderer *renderer;
int screen_window_id;
static SDL_Texture *rasterpos_indicator[2];
static int rasterpos_indicator_cnt = 0;
static int screen_grabbed = 0;
static int screen_fullscreen = 0;

struct monitor monitors[] = {
  { 1024, 626, 1024, 313, 64, 33, 768, 560 },
  { 896, 501, 896, 501, 0, 0, 896, 501 }
};

struct monitor mon;

#define PADDR(x, y) (screen->pixels + \
                         ((y) + BORDER_SIZE) * screen->pitch + \
                         ((x) + BORDER_SIZE) * screen->format->BytesPerPixel)

HANDLE_DIAGNOSTICS(screen)

void screen_make_texture(const char *scale)
{
  static const char *old_scale = "";
  int pixelformat = SDL_PIXELFORMAT_BGR24;
  if(debugger) pixelformat = SDL_PIXELFORMAT_RGB24;

  if (monitor_sm124)
    mon = monitors[1];<commit_msg>Remove BGR24 version that I cannot remember why it is there in the first place<commit_after>#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <SDL.h>

#include "screen.h"
#include "shifter.h"
#include "debug/display.h"
#include "diag.h"

struct monitor {
  int width, height, columns, lines;
  int crop_offset_x, crop_offset_y;
  int crop_width, crop_height;
};

static int disable = 0;
static SDL_Surface *screen;
static SDL_Texture *texture = NULL;
static SDL_Window *window;
static SDL_Renderer *renderer;
int screen_window_id;
static SDL_Texture *rasterpos_indicator[2];
static int rasterpos_indicator_cnt = 0;
static int screen_grabbed = 0;
static int screen_fullscreen = 0;

struct monitor monitors[] = {
  { 1024, 626, 1024, 313, 64, 33, 768, 560 },
  { 896, 501, 896, 501, 0, 0, 896, 501 }
};

struct monitor mon;

#define PADDR(x, y) (screen->pixels + \
                         ((y) + BORDER_SIZE) * screen->pitch + \
                         ((x) + BORDER_SIZE) * screen->format->BytesPerPixel)

HANDLE_DIAGNOSTICS(screen)

void screen_make_texture(const char *scale)
{
  static const char *old_scale = "";
  int pixelformat = SDL_PIXELFORMAT_RGB24;

  if (monitor_sm124)
    mon = monitors[1];
{'fraction_non_alphanumeric': 0.12001644060830251, 'fraction_numerical': 0.0468557336621455, 'mean_word_length': 4.0393374741200825, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, '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': '840636', 'n_tokens_mistral': 984, 'n_tokens_neox': 847, 'n_words': 239}