...
|
...
|
@@ -113,6 +113,7 @@ init(void)
|
113
|
113
|
gRenderer = SDL_CreateRenderer(gWindow, -1, 0);
|
114
|
114
|
if(gRenderer == NULL)
|
115
|
115
|
return error("Renderer", SDL_GetError());
|
|
116
|
+ SDL_RenderSetLogicalSize(gRenderer, ppu.width, ppu.height);
|
116
|
117
|
gTexture = SDL_CreateTexture(gRenderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, ppu.width, ppu.height);
|
117
|
118
|
if(gTexture == NULL)
|
118
|
119
|
return error("Texture", SDL_GetError());
|
...
|
...
|
@@ -136,8 +137,8 @@ void
|
136
|
137
|
domouse(SDL_Event *event)
|
137
|
138
|
{
|
138
|
139
|
Uint8 flag = 0x00;
|
139
|
|
- Uint16 x = clamp(event->motion.x / zoom - ppu.pad, 0, ppu.hor * 8 - 1);
|
140
|
|
- Uint16 y = clamp(event->motion.y / zoom - ppu.pad, 0, ppu.ver * 8 - 1);
|
|
140
|
+ Uint16 x = clamp(event->motion.x - ppu.pad, 0, ppu.hor * 8 - 1);
|
|
141
|
+ Uint16 y = clamp(event->motion.y - ppu.pad, 0, ppu.ver * 8 - 1);
|
141
|
142
|
mempoke16(devmouse->dat, 0x2, x);
|
142
|
143
|
mempoke16(devmouse->dat, 0x4, y);
|
143
|
144
|
devmouse->dat[7] = 0x00;
|