Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix event.custom_event first call #2071

Merged
merged 2 commits into from Sep 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src_c/event.c
Expand Up @@ -1898,7 +1898,7 @@ pg_event_get_blocked(PyObject *self, PyObject *args)
}


int _custom_event = PGE_USEREVENT;
int _custom_event = PGE_USEREVENT + 1;
static PyObject *
pg_event_custom_type(PyObject *self, PyObject *args)
{
Expand Down
1 change: 1 addition & 0 deletions test/event_test.py
Expand Up @@ -587,6 +587,7 @@ def test_event_equality(self):
self.assertFalse(a == d)

def test_custom_type(self):
self.assertEqual(pygame.event.custom_type(), pygame.USEREVENT + 1)
atype = pygame.event.custom_type()
atype2 = pygame.event.custom_type()

Expand Down