[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/backend gnash.cpp gtksup.cpp
From: |
Vitaly Alexeev |
Subject: |
[Gnash-commit] gnash/backend gnash.cpp gtksup.cpp |
Date: |
Wed, 05 Jul 2006 12:50:08 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Vitaly Alexeev <alexeev> 06/07/05 12:50:07
Modified files:
backend : gnash.cpp gtksup.cpp
Log message:
mouse_scaling.patch: Patch from Samuel Liden Borell <address@hidden>
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/gnash.cpp?cvsroot=gnash&r1=1.44&r2=1.45
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/gtksup.cpp?cvsroot=gnash&r1=1.6&r2=1.7
Patches:
Index: gnash.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/gnash.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- gnash.cpp 15 Jun 2006 18:33:15 -0000 1.44
+++ gnash.cpp 5 Jul 2006 12:50:07 -0000 1.45
@@ -170,6 +170,15 @@
SDLKey sdlk;
gnash::key::code gs;
} table[] = {
+ { SDLK_SPACE, gnash::key::SPACE },
+ { SDLK_PAGEDOWN, gnash::key::PGDN },
+ { SDLK_PAGEUP, gnash::key::PGUP },
+ { SDLK_HOME, gnash::key::HOME },
+ { SDLK_END, gnash::key::END },
+ { SDLK_INSERT, gnash::key::INSERT },
+ { SDLK_DELETE, gnash::key::DELETEKEY },
+ { SDLK_BACKSPACE, gnash::key::BACKSPACE },
+ { SDLK_TAB, gnash::key::TAB },
{ SDLK_RETURN, gnash::key::ENTER },
{ SDLK_ESCAPE, gnash::key::ESCAPE },
{ SDLK_LEFT, gnash::key::LEFT },
@@ -791,8 +800,8 @@
}
case SDL_MOUSEMOTION:
- mouse_x = (int) (event.motion.x / s_scale);
- mouse_y = (int) (event.motion.y / s_scale);
+ mouse_x = (int) event.motion.x;
+ mouse_y = (int) event.motion.y;
break;
case SDL_MOUSEBUTTONDOWN:
@@ -882,7 +891,9 @@
m->set_display_viewport(0, 0, width, height);
m->set_background_alpha(s_background ? 1.0f : 0.05f);
- m->notify_mouse_state(mouse_x, mouse_y, mouse_buttons);
+ m->notify_mouse_state((int) (mouse_x *
((float)movie_width / width)),
+
(int) (mouse_y * ((float)movie_height /
height)),
+
mouse_buttons);
m->advance(delta_t *speed_scale);
Index: gtksup.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/gtksup.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- gtksup.cpp 8 Jun 2006 12:25:35 -0000 1.6
+++ gtksup.cpp 5 Jul 2006 12:50:07 -0000 1.7
@@ -307,6 +307,9 @@
glViewport (0, 0,
widget->allocation.width, widget->allocation.height);
+ width = widget->allocation.width;
+ height = widget->allocation.height;
+
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
gluPerspective (40.0, 1.0, 1.0, 10.0);
- [Gnash-commit] gnash/backend gnash.cpp gtksup.cpp,
Vitaly Alexeev <=