File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,21 @@ zend_bool sdl_event_to_zval(SDL_Event *event, zval *value TSRMLS_DC)
4949 case SDL_MOUSEMOTION : {
5050 zval motion ;
5151 object_init (& motion );
52+ add_property_long (& motion , "state" , event -> motion .state TSRMLS_CC );
5253 add_property_long (& motion , "x" , event -> motion .x TSRMLS_CC );
5354 add_property_long (& motion , "y" , event -> motion .y TSRMLS_CC );
5455 add_property_zval (value , "motion" , & motion TSRMLS_CC );
5556 zval_ptr_dtor (& motion );
5657 } break ;
58+ case SDL_MOUSEBUTTONDOWN : {
59+ zval button ;
60+ object_init (& button );
61+ add_property_long (& button , "button" , event -> button .button TSRMLS_CC );
62+ add_property_long (& button , "x" , event -> button .x TSRMLS_CC );
63+ add_property_long (& button , "y" , event -> button .y TSRMLS_CC );
64+ add_property_zval (value , "button" , & button TSRMLS_CC );
65+ zval_ptr_dtor (& button );
66+ } break ;
5767 case SDL_KEYDOWN :
5868 case SDL_KEYUP : {
5969 zval keysym ;
You can’t perform that action at this time.
0 commit comments