In spite of their effectiveness, learning environments often fail to engage users and end up under-used. Many studies show that gamification of learning environments can enhance learners' motivation to use learning environments. However, learners react differently to specific game mechanics and little is known about how to adapt gaming features to learners' profiles. In this paper, we propose a process for adapting gaming features based on a player model. This model is inspired from existing player typologies and types of gamification elements. Our approach is implemented in a learning environment with five different gaming features, and evaluated with 266 participants. The main results of this study show that, amongst the most engaged learners (i.e. learners who use the environment the longest), those with adapted gaming features spend significantly more time in the learning environment. Furthermore, learners with features that are not adapted have a higher level of amotivation. These results support the relevance of adapting gaming features to enhance learners' engagement, and provide cues on means to implement adaptation mechanisms.