File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed
Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ set(INSTALL_PKGCONFIG_DIR "${GSKIT}/lib/pkgconfig" CACHE PATH "Installation dire
3030set (GSKIT_EXTERNAL_LIBS "" )
3131set (GSKIT_EXTERNAL_INCLUDES "" )
3232
33+ # Enable interprocedural optimization LTO
34+ set (CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE )
35+
3336set (CUR_GIT_TAG v0.0.0)
3437find_package (Git)
3538if (GIT_FOUND)
@@ -125,6 +128,8 @@ add_object_library_macros(GS_CORE_OBJS ee/gs/src/gsCore.c
125128 gsKit_remove_vsync_handler
126129 gsKit_add_hsync_handler
127130 gsKit_remove_hsync_handler
131+ gsKit_add_finish_handler
132+ gsKit_remove_finish_handler
128133 gsKit_clear
129134 gsKit_set_scissor
130135 gsKit_set_test
Original file line number Diff line number Diff line change @@ -152,6 +152,12 @@ int gsKit_add_hsync_handler(int (*hsync_callback)());
152152/// Removes a hsync interrupt handler
153153void gsKit_remove_hsync_handler (int callback_id );
154154
155+ /// Installs a finish interrupt handler
156+ int gsKit_add_finish_handler (int (* finish_callback )());
157+
158+ /// Removes a finish interrupt handler
159+ void gsKit_remove_finish_handler (int callback_id );
160+
155161/// Sets gsGlobal->EvenOrOdd depending on current field drawing
156162void gsKit_get_field (GSGLOBAL * gsGlobal );
157163
Original file line number Diff line number Diff line change @@ -252,6 +252,34 @@ void gsKit_remove_hsync_handler(int callback_id)
252252}
253253#endif
254254
255+ #if F_gsKit_add_finish_handler
256+ int gsKit_add_finish_handler (int (* finish_callback )())
257+ {
258+ int callback_id ;
259+
260+ DIntr ();
261+ callback_id = AddIntcHandler (INTC_GS , finish_callback , 0 );
262+ EnableIntc (INTC_GS );
263+ // Unmask Finish interrupt
264+ GsPutIMR (GsGetIMR () & ~0x0200 );
265+ EIntr ();
266+
267+ return callback_id ;
268+ }
269+ #endif
270+
271+ #if F_gsKit_remove_finish_handler
272+ void gsKit_remove_finish_handler (int callback_id )
273+ {
274+ DIntr ();
275+ // Mask HSync interrupt
276+ GsPutIMR (GsGetIMR () | 0x0200 );
277+ DisableIntc (INTC_GS );
278+ RemoveIntcHandler (INTC_GS , callback_id );
279+ EIntr ();
280+ }
281+ #endif
282+
255283#if F_gsKit_clear
256284#define MIN (X , Y ) (((X) < (Y)) ? (X) : (Y))
257285void gsKit_clear (GSGLOBAL * gsGlobal , u64 color )
You can’t perform that action at this time.
0 commit comments